#![allow(rustdoc::redundant_explicit_links)]
#![allow(rustdoc::broken_intra_doc_links)]
#![no_implicit_prelude]
extern crate async_trait;
extern crate bytes;
extern crate gax;
extern crate iam_v1;
extern crate lazy_static;
extern crate location;
extern crate longrunning;
extern crate lro;
extern crate reqwest;
extern crate serde;
extern crate serde_json;
extern crate serde_with;
extern crate std;
extern crate tracing;
extern crate wkt;
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct AuthConfig {
pub auth_type: crate::model::AuthType,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub additional_variables: std::vec::Vec<crate::model::ConfigVariable>,
#[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
pub r#type: std::option::Option<crate::model::auth_config::Type>,
}
impl AuthConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_auth_type<T: std::convert::Into<crate::model::AuthType>>(mut self, v: T) -> Self {
self.auth_type = v.into();
self
}
pub fn set_additional_variables<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ConfigVariable>,
{
use std::iter::Iterator;
self.additional_variables = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_type<T: std::convert::Into<std::option::Option<crate::model::auth_config::Type>>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn get_user_password(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::auth_config::UserPassword>> {
#[allow(unreachable_patterns)]
self.r#type.as_ref().and_then(|v| match v {
crate::model::auth_config::Type::UserPassword(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn get_oauth2_jwt_bearer(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::auth_config::Oauth2JwtBearer>> {
#[allow(unreachable_patterns)]
self.r#type.as_ref().and_then(|v| match v {
crate::model::auth_config::Type::Oauth2JwtBearer(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn get_oauth2_client_credentials(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::auth_config::Oauth2ClientCredentials>>
{
#[allow(unreachable_patterns)]
self.r#type.as_ref().and_then(|v| match v {
crate::model::auth_config::Type::Oauth2ClientCredentials(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn get_ssh_public_key(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::auth_config::SshPublicKey>> {
#[allow(unreachable_patterns)]
self.r#type.as_ref().and_then(|v| match v {
crate::model::auth_config::Type::SshPublicKey(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_user_password<
T: std::convert::Into<std::boxed::Box<crate::model::auth_config::UserPassword>>,
>(
mut self,
v: T,
) -> Self {
self.r#type =
std::option::Option::Some(crate::model::auth_config::Type::UserPassword(v.into()));
self
}
pub fn set_oauth2_jwt_bearer<
T: std::convert::Into<std::boxed::Box<crate::model::auth_config::Oauth2JwtBearer>>,
>(
mut self,
v: T,
) -> Self {
self.r#type =
std::option::Option::Some(crate::model::auth_config::Type::Oauth2JwtBearer(v.into()));
self
}
pub fn set_oauth2_client_credentials<
T: std::convert::Into<std::boxed::Box<crate::model::auth_config::Oauth2ClientCredentials>>,
>(
mut self,
v: T,
) -> Self {
self.r#type = std::option::Option::Some(
crate::model::auth_config::Type::Oauth2ClientCredentials(v.into()),
);
self
}
pub fn set_ssh_public_key<
T: std::convert::Into<std::boxed::Box<crate::model::auth_config::SshPublicKey>>,
>(
mut self,
v: T,
) -> Self {
self.r#type =
std::option::Option::Some(crate::model::auth_config::Type::SshPublicKey(v.into()));
self
}
}
impl wkt::message::Message for AuthConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthConfig"
}
}
pub mod auth_config {
#[allow(unused_imports)]
use super::*;
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct UserPassword {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub username: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub password: std::option::Option<crate::model::Secret>,
}
impl UserPassword {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.username = v.into();
self
}
pub fn set_password<T: std::convert::Into<std::option::Option<crate::model::Secret>>>(
mut self,
v: T,
) -> Self {
self.password = v.into();
self
}
}
impl wkt::message::Message for UserPassword {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthConfig.UserPassword"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Oauth2JwtBearer {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub client_key: std::option::Option<crate::model::Secret>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub jwt_claims:
std::option::Option<crate::model::auth_config::oauth_2_jwt_bearer::JwtClaims>,
}
impl Oauth2JwtBearer {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_client_key<T: std::convert::Into<std::option::Option<crate::model::Secret>>>(
mut self,
v: T,
) -> Self {
self.client_key = v.into();
self
}
pub fn set_jwt_claims<
T: std::convert::Into<
std::option::Option<crate::model::auth_config::oauth_2_jwt_bearer::JwtClaims>,
>,
>(
mut self,
v: T,
) -> Self {
self.jwt_claims = v.into();
self
}
}
impl wkt::message::Message for Oauth2JwtBearer {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthConfig.Oauth2JwtBearer"
}
}
pub mod oauth_2_jwt_bearer {
#[allow(unused_imports)]
use super::*;
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct JwtClaims {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub issuer: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub subject: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub audience: std::string::String,
}
impl JwtClaims {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_issuer<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.issuer = v.into();
self
}
pub fn set_subject<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.subject = v.into();
self
}
pub fn set_audience<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.audience = v.into();
self
}
}
impl wkt::message::Message for JwtClaims {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthConfig.Oauth2JwtBearer.JwtClaims"
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Oauth2ClientCredentials {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub client_id: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub client_secret: std::option::Option<crate::model::Secret>,
}
impl Oauth2ClientCredentials {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.client_id = v.into();
self
}
pub fn set_client_secret<
T: std::convert::Into<std::option::Option<crate::model::Secret>>,
>(
mut self,
v: T,
) -> Self {
self.client_secret = v.into();
self
}
}
impl wkt::message::Message for Oauth2ClientCredentials {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthConfig.Oauth2ClientCredentials"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct SshPublicKey {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub username: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub ssh_client_cert: std::option::Option<crate::model::Secret>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub cert_type: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub ssh_client_cert_pass: std::option::Option<crate::model::Secret>,
}
impl SshPublicKey {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_username<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.username = v.into();
self
}
pub fn set_ssh_client_cert<
T: std::convert::Into<std::option::Option<crate::model::Secret>>,
>(
mut self,
v: T,
) -> Self {
self.ssh_client_cert = v.into();
self
}
pub fn set_cert_type<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.cert_type = v.into();
self
}
pub fn set_ssh_client_cert_pass<
T: std::convert::Into<std::option::Option<crate::model::Secret>>,
>(
mut self,
v: T,
) -> Self {
self.ssh_client_cert_pass = v.into();
self
}
}
impl wkt::message::Message for SshPublicKey {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthConfig.SshPublicKey"
}
}
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(rename_all = "camelCase")]
#[non_exhaustive]
pub enum Type {
UserPassword(std::boxed::Box<crate::model::auth_config::UserPassword>),
Oauth2JwtBearer(std::boxed::Box<crate::model::auth_config::Oauth2JwtBearer>),
Oauth2ClientCredentials(
std::boxed::Box<crate::model::auth_config::Oauth2ClientCredentials>,
),
SshPublicKey(std::boxed::Box<crate::model::auth_config::SshPublicKey>),
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct AuthConfigTemplate {
pub auth_type: crate::model::AuthType,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub config_variable_templates: std::vec::Vec<crate::model::ConfigVariableTemplate>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub display_name: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
}
impl AuthConfigTemplate {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_auth_type<T: std::convert::Into<crate::model::AuthType>>(mut self, v: T) -> Self {
self.auth_type = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_config_variable_templates<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ConfigVariableTemplate>,
{
use std::iter::Iterator;
self.config_variable_templates = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for AuthConfigTemplate {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthConfigTemplate"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct OperationMetadata {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub create_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub end_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub target: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub verb: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub status_message: std::string::String,
pub requested_cancellation: bool,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub api_version: std::string::String,
}
impl OperationMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.create_time = v.into();
self
}
pub fn set_end_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.end_time = v.into();
self
}
pub fn set_target<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.target = v.into();
self
}
pub fn set_verb<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.verb = v.into();
self
}
pub fn set_status_message<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.status_message = v.into();
self
}
pub fn set_requested_cancellation<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.requested_cancellation = v.into();
self
}
pub fn set_api_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.api_version = v.into();
self
}
}
impl wkt::message::Message for OperationMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.OperationMetadata"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ConfigVariableTemplate {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub key: std::string::String,
pub value_type: crate::model::config_variable_template::ValueType,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub display_name: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub validation_regex: std::string::String,
pub required: bool,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub role_grant: std::option::Option<crate::model::RoleGrant>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub enum_options: std::vec::Vec<crate::model::EnumOption>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub authorization_code_link: std::option::Option<crate::model::AuthorizationCodeLink>,
pub state: crate::model::config_variable_template::State,
pub is_advanced: bool,
}
impl ConfigVariableTemplate {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.key = v.into();
self
}
pub fn set_value_type<
T: std::convert::Into<crate::model::config_variable_template::ValueType>,
>(
mut self,
v: T,
) -> Self {
self.value_type = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_validation_regex<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.validation_regex = v.into();
self
}
pub fn set_required<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.required = v.into();
self
}
pub fn set_role_grant<T: std::convert::Into<std::option::Option<crate::model::RoleGrant>>>(
mut self,
v: T,
) -> Self {
self.role_grant = v.into();
self
}
pub fn set_authorization_code_link<
T: std::convert::Into<std::option::Option<crate::model::AuthorizationCodeLink>>,
>(
mut self,
v: T,
) -> Self {
self.authorization_code_link = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::config_variable_template::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_is_advanced<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.is_advanced = v.into();
self
}
pub fn set_enum_options<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::EnumOption>,
{
use std::iter::Iterator;
self.enum_options = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ConfigVariableTemplate {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ConfigVariableTemplate"
}
}
pub mod config_variable_template {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct ValueType(std::borrow::Cow<'static, str>);
impl ValueType {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod value_type {
use super::ValueType;
pub const VALUE_TYPE_UNSPECIFIED: ValueType = ValueType::new("VALUE_TYPE_UNSPECIFIED");
pub const STRING: ValueType = ValueType::new("STRING");
pub const INT: ValueType = ValueType::new("INT");
pub const BOOL: ValueType = ValueType::new("BOOL");
pub const SECRET: ValueType = ValueType::new("SECRET");
pub const ENUM: ValueType = ValueType::new("ENUM");
pub const AUTHORIZATION_CODE: ValueType = ValueType::new("AUTHORIZATION_CODE");
}
impl std::convert::From<std::string::String> for ValueType {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct State(std::borrow::Cow<'static, str>);
impl State {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod state {
use super::State;
pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
pub const ACTIVE: State = State::new("ACTIVE");
pub const DEPRECATED: State = State::new("DEPRECATED");
}
impl std::convert::From<std::string::String> for State {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Secret {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub secret_version: std::string::String,
}
impl Secret {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_secret_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.secret_version = v.into();
self
}
}
impl wkt::message::Message for Secret {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.Secret"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct EnumOption {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub id: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub display_name: std::string::String,
}
impl EnumOption {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.id = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
}
impl wkt::message::Message for EnumOption {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.EnumOption"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ConfigVariable {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub key: std::string::String,
#[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
pub value: std::option::Option<crate::model::config_variable::Value>,
}
impl ConfigVariable {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.key = v.into();
self
}
pub fn set_value<
T: std::convert::Into<std::option::Option<crate::model::config_variable::Value>>,
>(
mut self,
v: T,
) -> Self {
self.value = v.into();
self
}
pub fn get_int_value(&self) -> std::option::Option<&i64> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::config_variable::Value::IntValue(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn get_bool_value(&self) -> std::option::Option<&bool> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::config_variable::Value::BoolValue(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn get_string_value(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::config_variable::Value::StringValue(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn get_secret_value(&self) -> std::option::Option<&std::boxed::Box<crate::model::Secret>> {
#[allow(unreachable_patterns)]
self.value.as_ref().and_then(|v| match v {
crate::model::config_variable::Value::SecretValue(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_int_value<T: std::convert::Into<i64>>(mut self, v: T) -> Self {
self.value =
std::option::Option::Some(crate::model::config_variable::Value::IntValue(v.into()));
self
}
pub fn set_bool_value<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.value =
std::option::Option::Some(crate::model::config_variable::Value::BoolValue(v.into()));
self
}
pub fn set_string_value<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.value =
std::option::Option::Some(crate::model::config_variable::Value::StringValue(v.into()));
self
}
pub fn set_secret_value<T: std::convert::Into<std::boxed::Box<crate::model::Secret>>>(
mut self,
v: T,
) -> Self {
self.value =
std::option::Option::Some(crate::model::config_variable::Value::SecretValue(v.into()));
self
}
}
impl wkt::message::Message for ConfigVariable {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ConfigVariable"
}
}
pub mod config_variable {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(rename_all = "camelCase")]
#[non_exhaustive]
pub enum Value {
IntValue(i64),
BoolValue(bool),
StringValue(std::string::String),
SecretValue(std::boxed::Box<crate::model::Secret>),
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct RoleGrant {
pub principal: crate::model::role_grant::Principal,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub roles: std::vec::Vec<std::string::String>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub resource: std::option::Option<crate::model::role_grant::Resource>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub helper_text_template: std::string::String,
}
impl RoleGrant {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_principal<T: std::convert::Into<crate::model::role_grant::Principal>>(
mut self,
v: T,
) -> Self {
self.principal = v.into();
self
}
pub fn set_resource<
T: std::convert::Into<std::option::Option<crate::model::role_grant::Resource>>,
>(
mut self,
v: T,
) -> Self {
self.resource = v.into();
self
}
pub fn set_helper_text_template<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.helper_text_template = v.into();
self
}
pub fn set_roles<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.roles = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for RoleGrant {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RoleGrant"
}
}
pub mod role_grant {
#[allow(unused_imports)]
use super::*;
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Resource {
#[serde(rename = "type")]
pub r#type: crate::model::role_grant::resource::Type,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub path_template: std::string::String,
}
impl Resource {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_type<T: std::convert::Into<crate::model::role_grant::resource::Type>>(
mut self,
v: T,
) -> Self {
self.r#type = v.into();
self
}
pub fn set_path_template<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.path_template = v.into();
self
}
}
impl wkt::message::Message for Resource {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RoleGrant.Resource"
}
}
pub mod resource {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct Type(std::borrow::Cow<'static, str>);
impl Type {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod r#type {
use super::Type;
pub const TYPE_UNSPECIFIED: Type = Type::new("TYPE_UNSPECIFIED");
pub const GCP_PROJECT: Type = Type::new("GCP_PROJECT");
pub const GCP_RESOURCE: Type = Type::new("GCP_RESOURCE");
pub const GCP_SECRETMANAGER_SECRET: Type = Type::new("GCP_SECRETMANAGER_SECRET");
pub const GCP_SECRETMANAGER_SECRET_VERSION: Type =
Type::new("GCP_SECRETMANAGER_SECRET_VERSION");
}
impl std::convert::From<std::string::String> for Type {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct Principal(std::borrow::Cow<'static, str>);
impl Principal {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod principal {
use super::Principal;
pub const PRINCIPAL_UNSPECIFIED: Principal = Principal::new("PRINCIPAL_UNSPECIFIED");
pub const CONNECTOR_SA: Principal = Principal::new("CONNECTOR_SA");
}
impl std::convert::From<std::string::String> for Principal {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct AuthorizationCodeLink {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub uri: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub scopes: std::vec::Vec<std::string::String>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub client_id: std::string::String,
pub enable_pkce: bool,
}
impl AuthorizationCodeLink {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.uri = v.into();
self
}
pub fn set_client_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.client_id = v.into();
self
}
pub fn set_enable_pkce<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.enable_pkce = v.into();
self
}
pub fn set_scopes<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.scopes = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for AuthorizationCodeLink {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.AuthorizationCodeLink"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Connection {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub create_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub update_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
pub labels: std::collections::HashMap<std::string::String, std::string::String>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub connector_version: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub status: std::option::Option<crate::model::ConnectionStatus>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub config_variables: std::vec::Vec<crate::model::ConfigVariable>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub auth_config: std::option::Option<crate::model::AuthConfig>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub lock_config: std::option::Option<crate::model::LockConfig>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub destination_configs: std::vec::Vec<crate::model::DestinationConfig>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub image_location: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub service_account: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub service_directory: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub envoy_image_location: std::string::String,
pub suspended: bool,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub node_config: std::option::Option<crate::model::NodeConfig>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub ssl_config: std::option::Option<crate::model::SslConfig>,
}
impl Connection {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.create_time = v.into();
self
}
pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.update_time = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_connector_version<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.connector_version = v.into();
self
}
pub fn set_status<
T: std::convert::Into<std::option::Option<crate::model::ConnectionStatus>>,
>(
mut self,
v: T,
) -> Self {
self.status = v.into();
self
}
pub fn set_auth_config<T: std::convert::Into<std::option::Option<crate::model::AuthConfig>>>(
mut self,
v: T,
) -> Self {
self.auth_config = v.into();
self
}
pub fn set_lock_config<T: std::convert::Into<std::option::Option<crate::model::LockConfig>>>(
mut self,
v: T,
) -> Self {
self.lock_config = v.into();
self
}
pub fn set_image_location<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.image_location = v.into();
self
}
pub fn set_service_account<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.service_account = v.into();
self
}
pub fn set_service_directory<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.service_directory = v.into();
self
}
pub fn set_envoy_image_location<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.envoy_image_location = v.into();
self
}
pub fn set_suspended<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.suspended = v.into();
self
}
pub fn set_node_config<T: std::convert::Into<std::option::Option<crate::model::NodeConfig>>>(
mut self,
v: T,
) -> Self {
self.node_config = v.into();
self
}
pub fn set_ssl_config<T: std::convert::Into<std::option::Option<crate::model::SslConfig>>>(
mut self,
v: T,
) -> Self {
self.ssl_config = v.into();
self
}
pub fn set_config_variables<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ConfigVariable>,
{
use std::iter::Iterator;
self.config_variables = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_destination_configs<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::DestinationConfig>,
{
use std::iter::Iterator;
self.destination_configs = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_labels<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
}
impl wkt::message::Message for Connection {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.Connection"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct NodeConfig {
pub min_node_count: i32,
pub max_node_count: i32,
}
impl NodeConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_min_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.min_node_count = v.into();
self
}
pub fn set_max_node_count<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.max_node_count = v.into();
self
}
}
impl wkt::message::Message for NodeConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.NodeConfig"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ConnectionSchemaMetadata {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub entities: std::vec::Vec<std::string::String>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub actions: std::vec::Vec<std::string::String>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub update_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub refresh_time: std::option::Option<wkt::Timestamp>,
pub state: crate::model::connection_schema_metadata::State,
}
impl ConnectionSchemaMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.update_time = v.into();
self
}
pub fn set_refresh_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.refresh_time = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::connection_schema_metadata::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_entities<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.entities = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_actions<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.actions = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ConnectionSchemaMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ConnectionSchemaMetadata"
}
}
pub mod connection_schema_metadata {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct State(std::borrow::Cow<'static, str>);
impl State {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod state {
use super::State;
pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
pub const REFRESHING: State = State::new("REFRESHING");
pub const UPDATED: State = State::new("UPDATED");
}
impl std::convert::From<std::string::String> for State {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct RuntimeEntitySchema {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub entity: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub fields: std::vec::Vec<crate::model::runtime_entity_schema::Field>,
}
impl RuntimeEntitySchema {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_entity<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.entity = v.into();
self
}
pub fn set_fields<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::runtime_entity_schema::Field>,
{
use std::iter::Iterator;
self.fields = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for RuntimeEntitySchema {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RuntimeEntitySchema"
}
}
pub mod runtime_entity_schema {
#[allow(unused_imports)]
use super::*;
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Field {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub field: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
pub data_type: crate::model::DataType,
pub key: bool,
pub readonly: bool,
pub nullable: bool,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub default_value: std::option::Option<wkt::Value>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub additional_details: std::option::Option<wkt::Struct>,
}
impl Field {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_data_type<T: std::convert::Into<crate::model::DataType>>(
mut self,
v: T,
) -> Self {
self.data_type = v.into();
self
}
pub fn set_key<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.key = v.into();
self
}
pub fn set_readonly<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.readonly = v.into();
self
}
pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.nullable = v.into();
self
}
pub fn set_default_value<T: std::convert::Into<std::option::Option<wkt::Value>>>(
mut self,
v: T,
) -> Self {
self.default_value = v.into();
self
}
pub fn set_additional_details<T: std::convert::Into<std::option::Option<wkt::Struct>>>(
mut self,
v: T,
) -> Self {
self.additional_details = v.into();
self
}
}
impl wkt::message::Message for Field {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RuntimeEntitySchema.Field"
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct RuntimeActionSchema {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub action: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub input_parameters: std::vec::Vec<crate::model::runtime_action_schema::InputParameter>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub result_metadata: std::vec::Vec<crate::model::runtime_action_schema::ResultMetadata>,
}
impl RuntimeActionSchema {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_action<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.action = v.into();
self
}
pub fn set_input_parameters<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::runtime_action_schema::InputParameter>,
{
use std::iter::Iterator;
self.input_parameters = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_result_metadata<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::runtime_action_schema::ResultMetadata>,
{
use std::iter::Iterator;
self.result_metadata = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for RuntimeActionSchema {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RuntimeActionSchema"
}
}
pub mod runtime_action_schema {
#[allow(unused_imports)]
use super::*;
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct InputParameter {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parameter: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
pub data_type: crate::model::DataType,
pub nullable: bool,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub default_value: std::option::Option<wkt::Value>,
}
impl InputParameter {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parameter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parameter = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_data_type<T: std::convert::Into<crate::model::DataType>>(
mut self,
v: T,
) -> Self {
self.data_type = v.into();
self
}
pub fn set_nullable<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.nullable = v.into();
self
}
pub fn set_default_value<T: std::convert::Into<std::option::Option<wkt::Value>>>(
mut self,
v: T,
) -> Self {
self.default_value = v.into();
self
}
}
impl wkt::message::Message for InputParameter {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RuntimeActionSchema.InputParameter"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ResultMetadata {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub field: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
pub data_type: crate::model::DataType,
}
impl ResultMetadata {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_field<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_data_type<T: std::convert::Into<crate::model::DataType>>(
mut self,
v: T,
) -> Self {
self.data_type = v.into();
self
}
}
impl wkt::message::Message for ResultMetadata {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RuntimeActionSchema.ResultMetadata"
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct LockConfig {
pub locked: bool,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub reason: std::string::String,
}
impl LockConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_locked<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.locked = v.into();
self
}
pub fn set_reason<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.reason = v.into();
self
}
}
impl wkt::message::Message for LockConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.LockConfig"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListConnectionsRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parent: std::string::String,
pub page_size: i32,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub page_token: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub filter: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub order_by: std::string::String,
pub view: crate::model::ConnectionView,
}
impl ListConnectionsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
pub fn set_order_by<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.order_by = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::ConnectionView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for ListConnectionsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListConnectionsRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListConnectionsResponse {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub connections: std::vec::Vec<crate::model::Connection>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub next_page_token: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub unreachable: std::vec::Vec<std::string::String>,
}
impl ListConnectionsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_connections<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Connection>,
{
use std::iter::Iterator;
self.connections = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListConnectionsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListConnectionsResponse"
}
}
#[cfg(feature = "unstable-stream")]
impl gax::paginator::PageableResponse for ListConnectionsResponse {
type PageItem = crate::model::Connection;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.connections
}
fn next_page_token(&self) -> std::string::String {
gax::paginator::extract_token(&self.next_page_token)
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GetConnectionRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
pub view: crate::model::ConnectionView,
}
impl GetConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::ConnectionView>>(mut self, v: T) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for GetConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.GetConnectionRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct CreateConnectionRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parent: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub connection_id: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub connection: std::option::Option<crate::model::Connection>,
}
impl CreateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_connection_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.connection_id = v.into();
self
}
pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
mut self,
v: T,
) -> Self {
self.connection = v.into();
self
}
}
impl wkt::message::Message for CreateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.CreateConnectionRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct UpdateConnectionRequest {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub connection: std::option::Option<crate::model::Connection>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub update_mask: std::option::Option<wkt::FieldMask>,
}
impl UpdateConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_connection<T: std::convert::Into<std::option::Option<crate::model::Connection>>>(
mut self,
v: T,
) -> Self {
self.connection = v.into();
self
}
pub fn set_update_mask<T: std::convert::Into<std::option::Option<wkt::FieldMask>>>(
mut self,
v: T,
) -> Self {
self.update_mask = v.into();
self
}
}
impl wkt::message::Message for UpdateConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.UpdateConnectionRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DeleteConnectionRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl DeleteConnectionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for DeleteConnectionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.DeleteConnectionRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GetConnectionSchemaMetadataRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl GetConnectionSchemaMetadataRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetConnectionSchemaMetadataRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.GetConnectionSchemaMetadataRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct RefreshConnectionSchemaMetadataRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl RefreshConnectionSchemaMetadataRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for RefreshConnectionSchemaMetadataRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RefreshConnectionSchemaMetadataRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListRuntimeEntitySchemasRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parent: std::string::String,
pub page_size: i32,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub page_token: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub filter: std::string::String,
}
impl ListRuntimeEntitySchemasRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListRuntimeEntitySchemasRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListRuntimeEntitySchemasRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListRuntimeEntitySchemasResponse {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub runtime_entity_schemas: std::vec::Vec<crate::model::RuntimeEntitySchema>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub next_page_token: std::string::String,
}
impl ListRuntimeEntitySchemasResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_runtime_entity_schemas<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::RuntimeEntitySchema>,
{
use std::iter::Iterator;
self.runtime_entity_schemas = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListRuntimeEntitySchemasResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListRuntimeEntitySchemasResponse"
}
}
#[cfg(feature = "unstable-stream")]
impl gax::paginator::PageableResponse for ListRuntimeEntitySchemasResponse {
type PageItem = crate::model::RuntimeEntitySchema;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.runtime_entity_schemas
}
fn next_page_token(&self) -> std::string::String {
gax::paginator::extract_token(&self.next_page_token)
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListRuntimeActionSchemasRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parent: std::string::String,
pub page_size: i32,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub page_token: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub filter: std::string::String,
}
impl ListRuntimeActionSchemasRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_filter<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.filter = v.into();
self
}
}
impl wkt::message::Message for ListRuntimeActionSchemasRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListRuntimeActionSchemasRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListRuntimeActionSchemasResponse {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub runtime_action_schemas: std::vec::Vec<crate::model::RuntimeActionSchema>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub next_page_token: std::string::String,
}
impl ListRuntimeActionSchemasResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_runtime_action_schemas<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::RuntimeActionSchema>,
{
use std::iter::Iterator;
self.runtime_action_schemas = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListRuntimeActionSchemasResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListRuntimeActionSchemasResponse"
}
}
#[cfg(feature = "unstable-stream")]
impl gax::paginator::PageableResponse for ListRuntimeActionSchemasResponse {
type PageItem = crate::model::RuntimeActionSchema;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.runtime_action_schemas
}
fn next_page_token(&self) -> std::string::String {
gax::paginator::extract_token(&self.next_page_token)
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ConnectionStatus {
pub state: crate::model::connection_status::State,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub status: std::string::String,
}
impl ConnectionStatus {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_state<T: std::convert::Into<crate::model::connection_status::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_status<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.status = v.into();
self
}
}
impl wkt::message::Message for ConnectionStatus {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ConnectionStatus"
}
}
pub mod connection_status {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct State(std::borrow::Cow<'static, str>);
impl State {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod state {
use super::State;
pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
pub const CREATING: State = State::new("CREATING");
pub const ACTIVE: State = State::new("ACTIVE");
pub const INACTIVE: State = State::new("INACTIVE");
pub const DELETING: State = State::new("DELETING");
pub const UPDATING: State = State::new("UPDATING");
pub const ERROR: State = State::new("ERROR");
pub const AUTHORIZATION_REQUIRED: State = State::new("AUTHORIZATION_REQUIRED");
}
impl std::convert::From<std::string::String> for State {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Connector {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub create_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub update_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
pub labels: std::collections::HashMap<std::string::String, std::string::String>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub documentation_uri: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub external_uri: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub web_assets_location: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub display_name: std::string::String,
pub launch_stage: crate::model::LaunchStage,
}
impl Connector {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.create_time = v.into();
self
}
pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.update_time = v.into();
self
}
pub fn set_documentation_uri<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.documentation_uri = v.into();
self
}
pub fn set_external_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.external_uri = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_web_assets_location<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.web_assets_location = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_launch_stage<T: std::convert::Into<crate::model::LaunchStage>>(
mut self,
v: T,
) -> Self {
self.launch_stage = v.into();
self
}
pub fn set_labels<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
}
impl wkt::message::Message for Connector {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.Connector"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GetConnectorRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl GetConnectorRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetConnectorRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.GetConnectorRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListConnectorsRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parent: std::string::String,
pub page_size: i32,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub page_token: std::string::String,
}
impl ListConnectorsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListConnectorsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListConnectorsRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListConnectorsResponse {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub connectors: std::vec::Vec<crate::model::Connector>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub next_page_token: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub unreachable: std::vec::Vec<std::string::String>,
}
impl ListConnectorsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_connectors<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Connector>,
{
use std::iter::Iterator;
self.connectors = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListConnectorsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListConnectorsResponse"
}
}
#[cfg(feature = "unstable-stream")]
impl gax::paginator::PageableResponse for ListConnectorsResponse {
type PageItem = crate::model::Connector;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.connectors
}
fn next_page_token(&self) -> std::string::String {
gax::paginator::extract_token(&self.next_page_token)
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ConnectorVersion {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub create_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub update_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
pub labels: std::collections::HashMap<std::string::String, std::string::String>,
pub launch_stage: crate::model::LaunchStage,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub release_version: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub auth_config_templates: std::vec::Vec<crate::model::AuthConfigTemplate>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub config_variable_templates: std::vec::Vec<crate::model::ConfigVariableTemplate>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub supported_runtime_features: std::option::Option<crate::model::SupportedRuntimeFeatures>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub display_name: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub egress_control_config: std::option::Option<crate::model::EgressControlConfig>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub role_grants: std::vec::Vec<crate::model::RoleGrant>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub role_grant: std::option::Option<crate::model::RoleGrant>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub ssl_config_template: std::option::Option<crate::model::SslConfigTemplate>,
}
impl ConnectorVersion {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.create_time = v.into();
self
}
pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.update_time = v.into();
self
}
pub fn set_launch_stage<T: std::convert::Into<crate::model::LaunchStage>>(
mut self,
v: T,
) -> Self {
self.launch_stage = v.into();
self
}
pub fn set_release_version<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.release_version = v.into();
self
}
pub fn set_supported_runtime_features<
T: std::convert::Into<std::option::Option<crate::model::SupportedRuntimeFeatures>>,
>(
mut self,
v: T,
) -> Self {
self.supported_runtime_features = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_egress_control_config<
T: std::convert::Into<std::option::Option<crate::model::EgressControlConfig>>,
>(
mut self,
v: T,
) -> Self {
self.egress_control_config = v.into();
self
}
pub fn set_role_grant<T: std::convert::Into<std::option::Option<crate::model::RoleGrant>>>(
mut self,
v: T,
) -> Self {
self.role_grant = v.into();
self
}
pub fn set_ssl_config_template<
T: std::convert::Into<std::option::Option<crate::model::SslConfigTemplate>>,
>(
mut self,
v: T,
) -> Self {
self.ssl_config_template = v.into();
self
}
pub fn set_auth_config_templates<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::AuthConfigTemplate>,
{
use std::iter::Iterator;
self.auth_config_templates = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_config_variable_templates<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ConfigVariableTemplate>,
{
use std::iter::Iterator;
self.config_variable_templates = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_role_grants<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::RoleGrant>,
{
use std::iter::Iterator;
self.role_grants = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_labels<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
}
impl wkt::message::Message for ConnectorVersion {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ConnectorVersion"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GetConnectorVersionRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
pub view: crate::model::ConnectorVersionView,
}
impl GetConnectorVersionRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::ConnectorVersionView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for GetConnectorVersionRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.GetConnectorVersionRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListConnectorVersionsRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parent: std::string::String,
pub page_size: i32,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub page_token: std::string::String,
pub view: crate::model::ConnectorVersionView,
}
impl ListConnectorVersionsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
pub fn set_view<T: std::convert::Into<crate::model::ConnectorVersionView>>(
mut self,
v: T,
) -> Self {
self.view = v.into();
self
}
}
impl wkt::message::Message for ListConnectorVersionsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListConnectorVersionsRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListConnectorVersionsResponse {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub connector_versions: std::vec::Vec<crate::model::ConnectorVersion>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub next_page_token: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub unreachable: std::vec::Vec<std::string::String>,
}
impl ListConnectorVersionsResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_connector_versions<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ConnectorVersion>,
{
use std::iter::Iterator;
self.connector_versions = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListConnectorVersionsResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListConnectorVersionsResponse"
}
}
#[cfg(feature = "unstable-stream")]
impl gax::paginator::PageableResponse for ListConnectorVersionsResponse {
type PageItem = crate::model::ConnectorVersion;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.connector_versions
}
fn next_page_token(&self) -> std::string::String {
gax::paginator::extract_token(&self.next_page_token)
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct SupportedRuntimeFeatures {
pub entity_apis: bool,
pub action_apis: bool,
pub sql_query: bool,
}
impl SupportedRuntimeFeatures {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_entity_apis<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.entity_apis = v.into();
self
}
pub fn set_action_apis<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.action_apis = v.into();
self
}
pub fn set_sql_query<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.sql_query = v.into();
self
}
}
impl wkt::message::Message for SupportedRuntimeFeatures {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.SupportedRuntimeFeatures"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct EgressControlConfig {
#[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
pub oneof_backends: std::option::Option<crate::model::egress_control_config::OneofBackends>,
}
impl EgressControlConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_oneof_backends<
T: std::convert::Into<std::option::Option<crate::model::egress_control_config::OneofBackends>>,
>(
mut self,
v: T,
) -> Self {
self.oneof_backends = v.into();
self
}
pub fn get_backends(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.oneof_backends.as_ref().and_then(|v| match v {
crate::model::egress_control_config::OneofBackends::Backends(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn get_extraction_rules(
&self,
) -> std::option::Option<&std::boxed::Box<crate::model::ExtractionRules>> {
#[allow(unreachable_patterns)]
self.oneof_backends.as_ref().and_then(|v| match v {
crate::model::egress_control_config::OneofBackends::ExtractionRules(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn set_backends<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.oneof_backends = std::option::Option::Some(
crate::model::egress_control_config::OneofBackends::Backends(v.into()),
);
self
}
pub fn set_extraction_rules<
T: std::convert::Into<std::boxed::Box<crate::model::ExtractionRules>>,
>(
mut self,
v: T,
) -> Self {
self.oneof_backends = std::option::Option::Some(
crate::model::egress_control_config::OneofBackends::ExtractionRules(v.into()),
);
self
}
}
impl wkt::message::Message for EgressControlConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.EgressControlConfig"
}
}
pub mod egress_control_config {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(rename_all = "camelCase")]
#[non_exhaustive]
pub enum OneofBackends {
Backends(std::string::String),
ExtractionRules(std::boxed::Box<crate::model::ExtractionRules>),
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ExtractionRules {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub extraction_rule: std::vec::Vec<crate::model::ExtractionRule>,
}
impl ExtractionRules {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_extraction_rule<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ExtractionRule>,
{
use std::iter::Iterator;
self.extraction_rule = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ExtractionRules {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ExtractionRules"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ExtractionRule {
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub source: std::option::Option<crate::model::extraction_rule::Source>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub extraction_regex: std::string::String,
}
impl ExtractionRule {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_source<
T: std::convert::Into<std::option::Option<crate::model::extraction_rule::Source>>,
>(
mut self,
v: T,
) -> Self {
self.source = v.into();
self
}
pub fn set_extraction_regex<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.extraction_regex = v.into();
self
}
}
impl wkt::message::Message for ExtractionRule {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ExtractionRule"
}
}
pub mod extraction_rule {
#[allow(unused_imports)]
use super::*;
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Source {
pub source_type: crate::model::extraction_rule::SourceType,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub field_id: std::string::String,
}
impl Source {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_source_type<T: std::convert::Into<crate::model::extraction_rule::SourceType>>(
mut self,
v: T,
) -> Self {
self.source_type = v.into();
self
}
pub fn set_field_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.field_id = v.into();
self
}
}
impl wkt::message::Message for Source {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ExtractionRule.Source"
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct SourceType(std::borrow::Cow<'static, str>);
impl SourceType {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod source_type {
use super::SourceType;
pub const SOURCE_TYPE_UNSPECIFIED: SourceType = SourceType::new("SOURCE_TYPE_UNSPECIFIED");
pub const CONFIG_VARIABLE: SourceType = SourceType::new("CONFIG_VARIABLE");
}
impl std::convert::From<std::string::String> for SourceType {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct DestinationConfig {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub key: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub destinations: std::vec::Vec<crate::model::Destination>,
}
impl DestinationConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_key<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.key = v.into();
self
}
pub fn set_destinations<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Destination>,
{
use std::iter::Iterator;
self.destinations = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for DestinationConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.DestinationConfig"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Destination {
pub port: i32,
#[serde(flatten, skip_serializing_if = "std::option::Option::is_none")]
pub destination: std::option::Option<crate::model::destination::Destination>,
}
impl Destination {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_port<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.port = v.into();
self
}
pub fn set_destination<
T: std::convert::Into<std::option::Option<crate::model::destination::Destination>>,
>(
mut self,
v: T,
) -> Self {
self.destination = v.into();
self
}
pub fn get_service_attachment(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.destination.as_ref().and_then(|v| match v {
crate::model::destination::Destination::ServiceAttachment(v) => {
std::option::Option::Some(v)
}
_ => std::option::Option::None,
})
}
pub fn get_host(&self) -> std::option::Option<&std::string::String> {
#[allow(unreachable_patterns)]
self.destination.as_ref().and_then(|v| match v {
crate::model::destination::Destination::Host(v) => std::option::Option::Some(v),
_ => std::option::Option::None,
})
}
pub fn set_service_attachment<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.destination = std::option::Option::Some(
crate::model::destination::Destination::ServiceAttachment(v.into()),
);
self
}
pub fn set_host<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.destination =
std::option::Option::Some(crate::model::destination::Destination::Host(v.into()));
self
}
}
impl wkt::message::Message for Destination {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.Destination"
}
}
pub mod destination {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(rename_all = "camelCase")]
#[non_exhaustive]
pub enum Destination {
ServiceAttachment(std::string::String),
Host(std::string::String),
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Provider {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub create_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub update_time: std::option::Option<wkt::Timestamp>,
#[serde(skip_serializing_if = "std::collections::HashMap::is_empty")]
pub labels: std::collections::HashMap<std::string::String, std::string::String>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub documentation_uri: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub external_uri: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub description: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub web_assets_location: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub display_name: std::string::String,
pub launch_stage: crate::model::LaunchStage,
}
impl Provider {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_create_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.create_time = v.into();
self
}
pub fn set_update_time<T: std::convert::Into<std::option::Option<wkt::Timestamp>>>(
mut self,
v: T,
) -> Self {
self.update_time = v.into();
self
}
pub fn set_documentation_uri<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.documentation_uri = v.into();
self
}
pub fn set_external_uri<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.external_uri = v.into();
self
}
pub fn set_description<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.description = v.into();
self
}
pub fn set_web_assets_location<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.web_assets_location = v.into();
self
}
pub fn set_display_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.display_name = v.into();
self
}
pub fn set_launch_stage<T: std::convert::Into<crate::model::LaunchStage>>(
mut self,
v: T,
) -> Self {
self.launch_stage = v.into();
self
}
pub fn set_labels<T, K, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = (K, V)>,
K: std::convert::Into<std::string::String>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.labels = v.into_iter().map(|(k, v)| (k.into(), v.into())).collect();
self
}
}
impl wkt::message::Message for Provider {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.Provider"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GetProviderRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl GetProviderRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetProviderRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.GetProviderRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListProvidersRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub parent: std::string::String,
pub page_size: i32,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub page_token: std::string::String,
}
impl ListProvidersRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_parent<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.parent = v.into();
self
}
pub fn set_page_size<T: std::convert::Into<i32>>(mut self, v: T) -> Self {
self.page_size = v.into();
self
}
pub fn set_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.page_token = v.into();
self
}
}
impl wkt::message::Message for ListProvidersRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListProvidersRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct ListProvidersResponse {
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub providers: std::vec::Vec<crate::model::Provider>,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub next_page_token: std::string::String,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub unreachable: std::vec::Vec<std::string::String>,
}
impl ListProvidersResponse {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_next_page_token<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.next_page_token = v.into();
self
}
pub fn set_providers<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::Provider>,
{
use std::iter::Iterator;
self.providers = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_unreachable<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<std::string::String>,
{
use std::iter::Iterator;
self.unreachable = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for ListProvidersResponse {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.ListProvidersResponse"
}
}
#[cfg(feature = "unstable-stream")]
impl gax::paginator::PageableResponse for ListProvidersResponse {
type PageItem = crate::model::Provider;
fn items(self) -> std::vec::Vec<Self::PageItem> {
self.providers
}
fn next_page_token(&self) -> std::string::String {
gax::paginator::extract_token(&self.next_page_token)
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GetRuntimeConfigRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl GetRuntimeConfigRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetRuntimeConfigRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.GetRuntimeConfigRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct RuntimeConfig {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub location_id: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub connd_topic: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub connd_subscription: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub control_plane_topic: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub control_plane_subscription: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub runtime_endpoint: std::string::String,
pub state: crate::model::runtime_config::State,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub schema_gcs_bucket: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub service_directory: std::string::String,
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl RuntimeConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_location_id<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.location_id = v.into();
self
}
pub fn set_connd_topic<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.connd_topic = v.into();
self
}
pub fn set_connd_subscription<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.connd_subscription = v.into();
self
}
pub fn set_control_plane_topic<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.control_plane_topic = v.into();
self
}
pub fn set_control_plane_subscription<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.control_plane_subscription = v.into();
self
}
pub fn set_runtime_endpoint<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.runtime_endpoint = v.into();
self
}
pub fn set_state<T: std::convert::Into<crate::model::runtime_config::State>>(
mut self,
v: T,
) -> Self {
self.state = v.into();
self
}
pub fn set_schema_gcs_bucket<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.schema_gcs_bucket = v.into();
self
}
pub fn set_service_directory<T: std::convert::Into<std::string::String>>(
mut self,
v: T,
) -> Self {
self.service_directory = v.into();
self
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for RuntimeConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.RuntimeConfig"
}
}
pub mod runtime_config {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct State(std::borrow::Cow<'static, str>);
impl State {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod state {
use super::State;
pub const STATE_UNSPECIFIED: State = State::new("STATE_UNSPECIFIED");
pub const INACTIVE: State = State::new("INACTIVE");
pub const ACTIVATING: State = State::new("ACTIVATING");
pub const ACTIVE: State = State::new("ACTIVE");
pub const CREATING: State = State::new("CREATING");
pub const DELETING: State = State::new("DELETING");
pub const UPDATING: State = State::new("UPDATING");
}
impl std::convert::From<std::string::String> for State {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct GetGlobalSettingsRequest {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
}
impl GetGlobalSettingsRequest {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
}
impl wkt::message::Message for GetGlobalSettingsRequest {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.GetGlobalSettingsRequest"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct Settings {
#[serde(skip_serializing_if = "std::string::String::is_empty")]
pub name: std::string::String,
pub vpcsc: bool,
pub payg: bool,
}
impl Settings {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_name<T: std::convert::Into<std::string::String>>(mut self, v: T) -> Self {
self.name = v.into();
self
}
pub fn set_vpcsc<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.vpcsc = v.into();
self
}
pub fn set_payg<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.payg = v.into();
self
}
}
impl wkt::message::Message for Settings {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.Settings"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct SslConfigTemplate {
pub ssl_type: crate::model::SslType,
pub is_tls_mandatory: bool,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub server_cert_type: std::vec::Vec<crate::model::CertType>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub client_cert_type: std::vec::Vec<crate::model::CertType>,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub additional_variables: std::vec::Vec<crate::model::ConfigVariableTemplate>,
}
impl SslConfigTemplate {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_ssl_type<T: std::convert::Into<crate::model::SslType>>(mut self, v: T) -> Self {
self.ssl_type = v.into();
self
}
pub fn set_is_tls_mandatory<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.is_tls_mandatory = v.into();
self
}
pub fn set_server_cert_type<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::CertType>,
{
use std::iter::Iterator;
self.server_cert_type = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_client_cert_type<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::CertType>,
{
use std::iter::Iterator;
self.client_cert_type = v.into_iter().map(|i| i.into()).collect();
self
}
pub fn set_additional_variables<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ConfigVariableTemplate>,
{
use std::iter::Iterator;
self.additional_variables = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for SslConfigTemplate {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.SslConfigTemplate"
}
}
#[serde_with::serde_as]
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
#[serde(default, rename_all = "camelCase")]
#[non_exhaustive]
pub struct SslConfig {
#[serde(rename = "type")]
pub r#type: crate::model::SslType,
pub trust_model: crate::model::ssl_config::TrustModel,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub private_server_certificate: std::option::Option<crate::model::Secret>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub client_certificate: std::option::Option<crate::model::Secret>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub client_private_key: std::option::Option<crate::model::Secret>,
#[serde(skip_serializing_if = "std::option::Option::is_none")]
pub client_private_key_pass: std::option::Option<crate::model::Secret>,
pub server_cert_type: crate::model::CertType,
pub client_cert_type: crate::model::CertType,
pub use_ssl: bool,
#[serde(skip_serializing_if = "std::vec::Vec::is_empty")]
pub additional_variables: std::vec::Vec<crate::model::ConfigVariable>,
}
impl SslConfig {
pub fn new() -> Self {
std::default::Default::default()
}
pub fn set_type<T: std::convert::Into<crate::model::SslType>>(mut self, v: T) -> Self {
self.r#type = v.into();
self
}
pub fn set_trust_model<T: std::convert::Into<crate::model::ssl_config::TrustModel>>(
mut self,
v: T,
) -> Self {
self.trust_model = v.into();
self
}
pub fn set_private_server_certificate<
T: std::convert::Into<std::option::Option<crate::model::Secret>>,
>(
mut self,
v: T,
) -> Self {
self.private_server_certificate = v.into();
self
}
pub fn set_client_certificate<
T: std::convert::Into<std::option::Option<crate::model::Secret>>,
>(
mut self,
v: T,
) -> Self {
self.client_certificate = v.into();
self
}
pub fn set_client_private_key<
T: std::convert::Into<std::option::Option<crate::model::Secret>>,
>(
mut self,
v: T,
) -> Self {
self.client_private_key = v.into();
self
}
pub fn set_client_private_key_pass<
T: std::convert::Into<std::option::Option<crate::model::Secret>>,
>(
mut self,
v: T,
) -> Self {
self.client_private_key_pass = v.into();
self
}
pub fn set_server_cert_type<T: std::convert::Into<crate::model::CertType>>(
mut self,
v: T,
) -> Self {
self.server_cert_type = v.into();
self
}
pub fn set_client_cert_type<T: std::convert::Into<crate::model::CertType>>(
mut self,
v: T,
) -> Self {
self.client_cert_type = v.into();
self
}
pub fn set_use_ssl<T: std::convert::Into<bool>>(mut self, v: T) -> Self {
self.use_ssl = v.into();
self
}
pub fn set_additional_variables<T, V>(mut self, v: T) -> Self
where
T: std::iter::IntoIterator<Item = V>,
V: std::convert::Into<crate::model::ConfigVariable>,
{
use std::iter::Iterator;
self.additional_variables = v.into_iter().map(|i| i.into()).collect();
self
}
}
impl wkt::message::Message for SslConfig {
fn typename() -> &'static str {
"type.googleapis.com/google.cloud.connectors.v1.SslConfig"
}
}
pub mod ssl_config {
#[allow(unused_imports)]
use super::*;
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct TrustModel(std::borrow::Cow<'static, str>);
impl TrustModel {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod trust_model {
use super::TrustModel;
pub const PUBLIC: TrustModel = TrustModel::new("PUBLIC");
pub const PRIVATE: TrustModel = TrustModel::new("PRIVATE");
pub const INSECURE: TrustModel = TrustModel::new("INSECURE");
}
impl std::convert::From<std::string::String> for TrustModel {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct AuthType(std::borrow::Cow<'static, str>);
impl AuthType {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod auth_type {
use super::AuthType;
pub const AUTH_TYPE_UNSPECIFIED: AuthType = AuthType::new("AUTH_TYPE_UNSPECIFIED");
pub const USER_PASSWORD: AuthType = AuthType::new("USER_PASSWORD");
pub const OAUTH2_JWT_BEARER: AuthType = AuthType::new("OAUTH2_JWT_BEARER");
pub const OAUTH2_CLIENT_CREDENTIALS: AuthType = AuthType::new("OAUTH2_CLIENT_CREDENTIALS");
pub const SSH_PUBLIC_KEY: AuthType = AuthType::new("SSH_PUBLIC_KEY");
pub const OAUTH2_AUTH_CODE_FLOW: AuthType = AuthType::new("OAUTH2_AUTH_CODE_FLOW");
}
impl std::convert::From<std::string::String> for AuthType {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct LaunchStage(std::borrow::Cow<'static, str>);
impl LaunchStage {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod launch_stage {
use super::LaunchStage;
pub const LAUNCH_STAGE_UNSPECIFIED: LaunchStage = LaunchStage::new("LAUNCH_STAGE_UNSPECIFIED");
pub const PREVIEW: LaunchStage = LaunchStage::new("PREVIEW");
pub const GA: LaunchStage = LaunchStage::new("GA");
pub const DEPRECATED: LaunchStage = LaunchStage::new("DEPRECATED");
pub const PRIVATE_PREVIEW: LaunchStage = LaunchStage::new("PRIVATE_PREVIEW");
}
impl std::convert::From<std::string::String> for LaunchStage {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct DataType(std::borrow::Cow<'static, str>);
impl DataType {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod data_type {
use super::DataType;
pub const DATA_TYPE_UNSPECIFIED: DataType = DataType::new("DATA_TYPE_UNSPECIFIED");
pub const DATA_TYPE_INT: DataType = DataType::new("DATA_TYPE_INT");
pub const DATA_TYPE_SMALLINT: DataType = DataType::new("DATA_TYPE_SMALLINT");
pub const DATA_TYPE_DOUBLE: DataType = DataType::new("DATA_TYPE_DOUBLE");
pub const DATA_TYPE_DATE: DataType = DataType::new("DATA_TYPE_DATE");
pub const DATA_TYPE_DATETIME: DataType = DataType::new("DATA_TYPE_DATETIME");
pub const DATA_TYPE_TIME: DataType = DataType::new("DATA_TYPE_TIME");
pub const DATA_TYPE_STRING: DataType = DataType::new("DATA_TYPE_STRING");
pub const DATA_TYPE_LONG: DataType = DataType::new("DATA_TYPE_LONG");
pub const DATA_TYPE_BOOLEAN: DataType = DataType::new("DATA_TYPE_BOOLEAN");
pub const DATA_TYPE_DECIMAL: DataType = DataType::new("DATA_TYPE_DECIMAL");
pub const DATA_TYPE_UUID: DataType = DataType::new("DATA_TYPE_UUID");
pub const DATA_TYPE_BLOB: DataType = DataType::new("DATA_TYPE_BLOB");
pub const DATA_TYPE_BIT: DataType = DataType::new("DATA_TYPE_BIT");
pub const DATA_TYPE_TINYINT: DataType = DataType::new("DATA_TYPE_TINYINT");
pub const DATA_TYPE_INTEGER: DataType = DataType::new("DATA_TYPE_INTEGER");
pub const DATA_TYPE_BIGINT: DataType = DataType::new("DATA_TYPE_BIGINT");
pub const DATA_TYPE_FLOAT: DataType = DataType::new("DATA_TYPE_FLOAT");
pub const DATA_TYPE_REAL: DataType = DataType::new("DATA_TYPE_REAL");
pub const DATA_TYPE_NUMERIC: DataType = DataType::new("DATA_TYPE_NUMERIC");
pub const DATA_TYPE_CHAR: DataType = DataType::new("DATA_TYPE_CHAR");
pub const DATA_TYPE_VARCHAR: DataType = DataType::new("DATA_TYPE_VARCHAR");
pub const DATA_TYPE_LONGVARCHAR: DataType = DataType::new("DATA_TYPE_LONGVARCHAR");
pub const DATA_TYPE_TIMESTAMP: DataType = DataType::new("DATA_TYPE_TIMESTAMP");
pub const DATA_TYPE_NCHAR: DataType = DataType::new("DATA_TYPE_NCHAR");
pub const DATA_TYPE_NVARCHAR: DataType = DataType::new("DATA_TYPE_NVARCHAR");
pub const DATA_TYPE_LONGNVARCHAR: DataType = DataType::new("DATA_TYPE_LONGNVARCHAR");
pub const DATA_TYPE_NULL: DataType = DataType::new("DATA_TYPE_NULL");
pub const DATA_TYPE_OTHER: DataType = DataType::new("DATA_TYPE_OTHER");
pub const DATA_TYPE_JAVA_OBJECT: DataType = DataType::new("DATA_TYPE_JAVA_OBJECT");
pub const DATA_TYPE_DISTINCT: DataType = DataType::new("DATA_TYPE_DISTINCT");
pub const DATA_TYPE_STRUCT: DataType = DataType::new("DATA_TYPE_STRUCT");
pub const DATA_TYPE_ARRAY: DataType = DataType::new("DATA_TYPE_ARRAY");
pub const DATA_TYPE_CLOB: DataType = DataType::new("DATA_TYPE_CLOB");
pub const DATA_TYPE_REF: DataType = DataType::new("DATA_TYPE_REF");
pub const DATA_TYPE_DATALINK: DataType = DataType::new("DATA_TYPE_DATALINK");
pub const DATA_TYPE_ROWID: DataType = DataType::new("DATA_TYPE_ROWID");
pub const DATA_TYPE_BINARY: DataType = DataType::new("DATA_TYPE_BINARY");
pub const DATA_TYPE_VARBINARY: DataType = DataType::new("DATA_TYPE_VARBINARY");
pub const DATA_TYPE_LONGVARBINARY: DataType = DataType::new("DATA_TYPE_LONGVARBINARY");
pub const DATA_TYPE_NCLOB: DataType = DataType::new("DATA_TYPE_NCLOB");
pub const DATA_TYPE_SQLXML: DataType = DataType::new("DATA_TYPE_SQLXML");
pub const DATA_TYPE_REF_CURSOR: DataType = DataType::new("DATA_TYPE_REF_CURSOR");
pub const DATA_TYPE_TIME_WITH_TIMEZONE: DataType =
DataType::new("DATA_TYPE_TIME_WITH_TIMEZONE");
pub const DATA_TYPE_TIMESTAMP_WITH_TIMEZONE: DataType =
DataType::new("DATA_TYPE_TIMESTAMP_WITH_TIMEZONE");
}
impl std::convert::From<std::string::String> for DataType {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct ConnectionView(std::borrow::Cow<'static, str>);
impl ConnectionView {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod connection_view {
use super::ConnectionView;
pub const CONNECTION_VIEW_UNSPECIFIED: ConnectionView =
ConnectionView::new("CONNECTION_VIEW_UNSPECIFIED");
pub const BASIC: ConnectionView = ConnectionView::new("BASIC");
pub const FULL: ConnectionView = ConnectionView::new("FULL");
}
impl std::convert::From<std::string::String> for ConnectionView {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct ConnectorVersionView(std::borrow::Cow<'static, str>);
impl ConnectorVersionView {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod connector_version_view {
use super::ConnectorVersionView;
pub const CONNECTOR_VERSION_VIEW_UNSPECIFIED: ConnectorVersionView =
ConnectorVersionView::new("CONNECTOR_VERSION_VIEW_UNSPECIFIED");
pub const CONNECTOR_VERSION_VIEW_BASIC: ConnectorVersionView =
ConnectorVersionView::new("CONNECTOR_VERSION_VIEW_BASIC");
pub const CONNECTOR_VERSION_VIEW_FULL: ConnectorVersionView =
ConnectorVersionView::new("CONNECTOR_VERSION_VIEW_FULL");
}
impl std::convert::From<std::string::String> for ConnectorVersionView {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct SslType(std::borrow::Cow<'static, str>);
impl SslType {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod ssl_type {
use super::SslType;
pub const SSL_TYPE_UNSPECIFIED: SslType = SslType::new("SSL_TYPE_UNSPECIFIED");
pub const TLS: SslType = SslType::new("TLS");
pub const MTLS: SslType = SslType::new("MTLS");
}
impl std::convert::From<std::string::String> for SslType {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}
#[derive(Clone, Debug, Default, PartialEq, serde::Deserialize, serde::Serialize)]
pub struct CertType(std::borrow::Cow<'static, str>);
impl CertType {
pub const fn new(v: &'static str) -> Self {
Self(std::borrow::Cow::Borrowed(v))
}
pub fn value(&self) -> &str {
&self.0
}
}
pub mod cert_type {
use super::CertType;
pub const CERT_TYPE_UNSPECIFIED: CertType = CertType::new("CERT_TYPE_UNSPECIFIED");
pub const PEM: CertType = CertType::new("PEM");
}
impl std::convert::From<std::string::String> for CertType {
fn from(value: std::string::String) -> Self {
Self(std::borrow::Cow::Owned(value))
}
}