#![doc = "generated by AutoRust"]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Deserialize, Serialize};
#[doc = "Container service"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerService {
#[serde(flatten)]
pub resource: Resource,
#[doc = "Properties of container service"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<ContainerServiceProperties>,
}
impl ContainerService {
pub fn new(resource: Resource) -> Self {
Self {
resource,
properties: None,
}
}
}
#[doc = "Profile for container service agent pool"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerServiceAgentPoolProfile {
#[doc = "Unique name of the agent pool profile within the context of the subscription and resource group"]
pub name: String,
#[doc = "No. of agents (VMs) that will host docker containers"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub count: Option<i32>,
#[doc = "Size of agent VMs"]
#[serde(rename = "vmSize", default, skip_serializing_if = "Option::is_none")]
pub vm_size: Option<container_service_agent_pool_profile::VmSize>,
#[doc = "DNS prefix to be used to create FQDN for this agent pool"]
#[serde(rename = "dnsPrefix")]
pub dns_prefix: String,
#[doc = "FQDN for the agent pool"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub fqdn: Option<String>,
}
impl ContainerServiceAgentPoolProfile {
pub fn new(name: String, dns_prefix: String) -> Self {
Self {
name,
count: None,
vm_size: None,
dns_prefix,
fqdn: None,
}
}
}
pub mod container_service_agent_pool_profile {
use super::*;
#[doc = "Size of agent VMs"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum VmSize {
#[serde(rename = "Standard_A0")]
StandardA0,
#[serde(rename = "Standard_A1")]
StandardA1,
#[serde(rename = "Standard_A2")]
StandardA2,
#[serde(rename = "Standard_A3")]
StandardA3,
#[serde(rename = "Standard_A4")]
StandardA4,
#[serde(rename = "Standard_A5")]
StandardA5,
#[serde(rename = "Standard_A6")]
StandardA6,
#[serde(rename = "Standard_A7")]
StandardA7,
#[serde(rename = "Standard_A8")]
StandardA8,
#[serde(rename = "Standard_A9")]
StandardA9,
#[serde(rename = "Standard_A10")]
StandardA10,
#[serde(rename = "Standard_A11")]
StandardA11,
#[serde(rename = "Standard_D1")]
StandardD1,
#[serde(rename = "Standard_D2")]
StandardD2,
#[serde(rename = "Standard_D3")]
StandardD3,
#[serde(rename = "Standard_D4")]
StandardD4,
#[serde(rename = "Standard_D11")]
StandardD11,
#[serde(rename = "Standard_D12")]
StandardD12,
#[serde(rename = "Standard_D13")]
StandardD13,
#[serde(rename = "Standard_D14")]
StandardD14,
#[serde(rename = "Standard_D1_v2")]
StandardD1V2,
#[serde(rename = "Standard_D2_v2")]
StandardD2V2,
#[serde(rename = "Standard_D3_v2")]
StandardD3V2,
#[serde(rename = "Standard_D4_v2")]
StandardD4V2,
#[serde(rename = "Standard_D5_v2")]
StandardD5V2,
#[serde(rename = "Standard_D11_v2")]
StandardD11V2,
#[serde(rename = "Standard_D12_v2")]
StandardD12V2,
#[serde(rename = "Standard_D13_v2")]
StandardD13V2,
#[serde(rename = "Standard_D14_v2")]
StandardD14V2,
#[serde(rename = "Standard_G1")]
StandardG1,
#[serde(rename = "Standard_G2")]
StandardG2,
#[serde(rename = "Standard_G3")]
StandardG3,
#[serde(rename = "Standard_G4")]
StandardG4,
#[serde(rename = "Standard_G5")]
StandardG5,
#[serde(rename = "Standard_DS1")]
StandardDs1,
#[serde(rename = "Standard_DS2")]
StandardDs2,
#[serde(rename = "Standard_DS3")]
StandardDs3,
#[serde(rename = "Standard_DS4")]
StandardDs4,
#[serde(rename = "Standard_DS11")]
StandardDs11,
#[serde(rename = "Standard_DS12")]
StandardDs12,
#[serde(rename = "Standard_DS13")]
StandardDs13,
#[serde(rename = "Standard_DS14")]
StandardDs14,
#[serde(rename = "Standard_GS1")]
StandardGs1,
#[serde(rename = "Standard_GS2")]
StandardGs2,
#[serde(rename = "Standard_GS3")]
StandardGs3,
#[serde(rename = "Standard_GS4")]
StandardGs4,
#[serde(rename = "Standard_GS5")]
StandardGs5,
}
}
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContainerServiceDiagnosticsProfile {
#[doc = "Describes VM Diagnostics."]
#[serde(rename = "vmDiagnostics", default, skip_serializing_if = "Option::is_none")]
pub vm_diagnostics: Option<ContainerServiceVmDiagnostics>,
}
impl ContainerServiceDiagnosticsProfile {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Profile for Linux VM"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerServiceLinuxProfile {
#[doc = "The administrator username to use for all Linux VMs"]
#[serde(rename = "adminUsername")]
pub admin_username: String,
#[doc = "SSH configuration for Linux based VMs running on Azure"]
pub ssh: ContainerServiceSshConfiguration,
}
impl ContainerServiceLinuxProfile {
pub fn new(admin_username: String, ssh: ContainerServiceSshConfiguration) -> Self {
Self { admin_username, ssh }
}
}
#[doc = "The List Container Service operation response"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContainerServiceListResult {
#[doc = "Gets or sets the list of container services."]
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub value: Vec<ContainerService>,
}
impl ContainerServiceListResult {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Profile for container service master"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerServiceMasterProfile {
#[doc = "Number of masters (VMs) in the container cluster"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub count: Option<container_service_master_profile::Count>,
#[doc = "DNS prefix to be used to create FQDN for master"]
#[serde(rename = "dnsPrefix")]
pub dns_prefix: String,
#[doc = "FQDN for the master"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub fqdn: Option<String>,
}
impl ContainerServiceMasterProfile {
pub fn new(dns_prefix: String) -> Self {
Self {
count: None,
dns_prefix,
fqdn: None,
}
}
}
pub mod container_service_master_profile {
use super::*;
#[doc = "Number of masters (VMs) in the container cluster"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum Count {}
}
#[doc = "Profile for Orchestrator"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContainerServiceOrchestratorProfile {
#[doc = "Specifies what orchestrator will be used to manage container cluster resources."]
#[serde(rename = "orchestratorType", default, skip_serializing_if = "Option::is_none")]
pub orchestrator_type: Option<container_service_orchestrator_profile::OrchestratorType>,
}
impl ContainerServiceOrchestratorProfile {
pub fn new() -> Self {
Self::default()
}
}
pub mod container_service_orchestrator_profile {
use super::*;
#[doc = "Specifies what orchestrator will be used to manage container cluster resources."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum OrchestratorType {
Mesos,
SwarmPreview,
#[serde(rename = "DCOS")]
Dcos,
}
}
#[doc = "Properties of container service"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerServiceProperties {
#[doc = "Gets the provisioning state, which only appears in the response."]
#[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
pub provisioning_state: Option<String>,
#[doc = "Profile for Orchestrator"]
#[serde(rename = "orchestratorProfile", default, skip_serializing_if = "Option::is_none")]
pub orchestrator_profile: Option<ContainerServiceOrchestratorProfile>,
#[doc = "Profile for container service master"]
#[serde(rename = "masterProfile")]
pub master_profile: ContainerServiceMasterProfile,
#[doc = "Properties of agent pools"]
#[serde(rename = "agentPoolProfiles")]
pub agent_pool_profiles: Vec<ContainerServiceAgentPoolProfile>,
#[doc = "Profile for Windows jumpbox"]
#[serde(rename = "windowsProfile", default, skip_serializing_if = "Option::is_none")]
pub windows_profile: Option<ContainerServiceWindowsProfile>,
#[doc = "Profile for Linux VM"]
#[serde(rename = "linuxProfile")]
pub linux_profile: ContainerServiceLinuxProfile,
#[serde(rename = "diagnosticsProfile", default, skip_serializing_if = "Option::is_none")]
pub diagnostics_profile: Option<ContainerServiceDiagnosticsProfile>,
}
impl ContainerServiceProperties {
pub fn new(
master_profile: ContainerServiceMasterProfile,
agent_pool_profiles: Vec<ContainerServiceAgentPoolProfile>,
linux_profile: ContainerServiceLinuxProfile,
) -> Self {
Self {
provisioning_state: None,
orchestrator_profile: None,
master_profile,
agent_pool_profiles,
windows_profile: None,
linux_profile,
diagnostics_profile: None,
}
}
}
#[doc = "SSH configuration for Linux based VMs running on Azure"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContainerServiceSshConfiguration {
#[doc = "Gets or sets the list of SSH public keys used to authenticate with Linux based VMs"]
#[serde(rename = "publicKeys", default, skip_serializing_if = "Vec::is_empty")]
pub public_keys: Vec<ContainerServiceSshPublicKey>,
}
impl ContainerServiceSshConfiguration {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Contains information about SSH certificate public key data."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerServiceSshPublicKey {
#[doc = "Gets or sets Certificate public key used to authenticate with VM through SSH. The certificate must be in Pem format with or without headers."]
#[serde(rename = "keyData")]
pub key_data: String,
}
impl ContainerServiceSshPublicKey {
pub fn new(key_data: String) -> Self {
Self { key_data }
}
}
#[doc = "Describes VM Diagnostics."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ContainerServiceVmDiagnostics {
#[doc = "Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub enabled: Option<bool>,
#[doc = "Gets or sets whether VM Diagnostic Agent should be provisioned on the Virtual Machine."]
#[serde(rename = "storageUri", default, skip_serializing_if = "Option::is_none")]
pub storage_uri: Option<String>,
}
impl ContainerServiceVmDiagnostics {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Profile for Windows jumpbox"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct ContainerServiceWindowsProfile {
#[doc = "The administrator username to use for Windows jumpbox"]
#[serde(rename = "adminUsername")]
pub admin_username: String,
#[doc = "The administrator password to use for Windows jumpbox"]
#[serde(rename = "adminPassword")]
pub admin_password: String,
}
impl ContainerServiceWindowsProfile {
pub fn new(admin_username: String, admin_password: String) -> Self {
Self {
admin_username,
admin_password,
}
}
}
#[doc = "The Resource model definition."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Resource {
#[doc = "Resource Id"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub id: Option<String>,
#[doc = "Resource name"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Resource type"]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
#[doc = "Resource location"]
pub location: String,
#[doc = "Resource tags"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub tags: Option<serde_json::Value>,
}
impl Resource {
pub fn new(location: String) -> Self {
Self {
id: None,
name: None,
type_: None,
location,
tags: None,
}
}
}