// This file is auto-generated by oagen. Do not edit.
#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct CreateDataIntegration {
/// The provider to create a Data Integration for. For a built-in provider use its slug (e.g. `github`, `slack`). For a custom provider, this is the new provider slug and `custom_provider` must be supplied. A custom provider slug cannot shadow an existing global provider slug.
pub provider: String,
/// An optional description of the Data Integration.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub description: Option<String>,
/// Whether the Data Integration is enabled. Defaults to `false`.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub enabled: Option<bool>,
/// The OAuth scopes to request for the Data Integration. Defaults to the provider's configured scopes when omitted.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub scopes: Option<Vec<String>>,
/// How accounts authenticate with the provider. Defaults to `["oauth"]`. Use `["api_key"]` to declare an API key integration; `credentials` is then not required and keys are supplied per-tenant (optionally via `api_key` on this request).
#[serde(skip_serializing_if = "Option::is_none", default)]
pub auth_methods: Option<Vec<CreateDataIntegrationAuthMethods>>,
/// Provider-specific config values (e.g. a Snowflake `account_identifier`), keyed by the config field. Only fields the built-in provider declares are accepted.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub config: Option<std::collections::HashMap<String, String>>,
/// The OAuth credentials to configure for the Data Integration. Required for OAuth integrations; omit when `auth_methods` is `["api_key"]`.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub credentials: Option<DataIntegrationCredentialsInput>,
/// An optional API key to install for the first tenant on an `api_key` integration. Omit to declare a keyless integration; tenants can be added later via the per-installation API key path.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub api_key: Option<ApiKeyInstallation>,
/// The OAuth definition for a custom provider. Supply this to define a custom provider; omit it to create an integration for a built-in provider.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub custom_provider: Option<CustomProviderDefinition>,
}