#![doc = "generated by AutoRust"]
#![allow(non_camel_case_types)]
#![allow(unused_imports)]
use serde::{Deserialize, Serialize};
#[doc = "Address information for domain registration."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Address {
#[doc = "First line of an Address."]
pub address1: String,
#[doc = "The second line of the Address. Optional."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub address2: Option<String>,
#[doc = "The city for the address."]
pub city: String,
#[doc = "The country for the address."]
pub country: String,
#[doc = "The postal code for the address."]
#[serde(rename = "postalCode")]
pub postal_code: String,
#[doc = "The state or province for the address."]
pub state: String,
}
impl Address {
pub fn new(address1: String, city: String, country: String, postal_code: String, state: String) -> Self {
Self {
address1,
address2: None,
city,
country,
postal_code,
state,
}
}
}
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Contact {
#[doc = "Address information for domain registration."]
#[serde(rename = "addressMailing", default, skip_serializing_if = "Option::is_none")]
pub address_mailing: Option<Address>,
#[doc = "Email address."]
pub email: String,
#[doc = "Fax number."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub fax: Option<String>,
#[doc = "Job title."]
#[serde(rename = "jobTitle", default, skip_serializing_if = "Option::is_none")]
pub job_title: Option<String>,
#[doc = "First name."]
#[serde(rename = "nameFirst")]
pub name_first: String,
#[doc = "Last name."]
#[serde(rename = "nameLast")]
pub name_last: String,
#[doc = "Middle name."]
#[serde(rename = "nameMiddle", default, skip_serializing_if = "Option::is_none")]
pub name_middle: Option<String>,
#[doc = "Organization contact belongs to."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub organization: Option<String>,
#[doc = "Phone number."]
pub phone: String,
}
impl Contact {
pub fn new(email: String, name_first: String, name_last: String, phone: String) -> Self {
Self {
address_mailing: None,
email,
fax: None,
job_title: None,
name_first,
name_last,
name_middle: None,
organization: None,
phone,
}
}
}
#[doc = "Collection of Azure resource manager operation metadata."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct CsmOperationCollection {
#[doc = "Collection of resources."]
pub value: Vec<CsmOperationDescription>,
#[doc = "Link to next page of resources."]
#[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
pub next_link: Option<String>,
}
impl CsmOperationCollection {
pub fn new(value: Vec<CsmOperationDescription>) -> Self {
Self { value, next_link: None }
}
}
#[doc = "Description of an operation available for Microsoft.Web resource provider."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct CsmOperationDescription {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "Meta data about operation used for display in portal."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub display: Option<CsmOperationDisplay>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub origin: Option<String>,
#[doc = "Properties available for a Microsoft.Web resource provider operation."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<CsmOperationDescriptionProperties>,
}
impl CsmOperationDescription {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Properties available for a Microsoft.Web resource provider operation."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct CsmOperationDescriptionProperties {
#[doc = "Resource metrics service provided by Microsoft.Insights resource provider."]
#[serde(rename = "serviceSpecification", default, skip_serializing_if = "Option::is_none")]
pub service_specification: Option<ServiceSpecification>,
}
impl CsmOperationDescriptionProperties {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Meta data about operation used for display in portal."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct CsmOperationDisplay {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub provider: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub resource: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub operation: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
}
impl CsmOperationDisplay {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Dimension of a resource metric. For e.g. instance specific HTTP requests for a web app, \nwhere instance name is dimension of the metric HTTP request"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Dimension {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "internalName", default, skip_serializing_if = "Option::is_none")]
pub internal_name: Option<String>,
#[serde(rename = "toBeExportedForShoebox", default, skip_serializing_if = "Option::is_none")]
pub to_be_exported_for_shoebox: Option<bool>,
}
impl Dimension {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Information about a domain."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Domain {
#[serde(flatten)]
pub resource: Resource,
#[doc = "Domain resource specific properties"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<domain::Properties>,
}
impl Domain {
pub fn new(resource: Resource) -> Self {
Self {
resource,
properties: None,
}
}
}
pub mod domain {
use super::*;
#[doc = "Domain resource specific properties"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Properties {
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactAdmin")]
pub contact_admin: Contact,
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactBilling")]
pub contact_billing: Contact,
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactRegistrant")]
pub contact_registrant: Contact,
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactTech")]
pub contact_tech: Contact,
#[doc = "Domain registration status."]
#[serde(rename = "registrationStatus", default, skip_serializing_if = "Option::is_none")]
pub registration_status: Option<properties::RegistrationStatus>,
#[doc = "Domain provisioning state."]
#[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
pub provisioning_state: Option<properties::ProvisioningState>,
#[doc = "Name servers."]
#[serde(rename = "nameServers", default, skip_serializing_if = "Vec::is_empty")]
pub name_servers: Vec<String>,
#[doc = "<code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub privacy: Option<bool>,
#[doc = "Domain creation timestamp."]
#[serde(rename = "createdTime", default, skip_serializing_if = "Option::is_none")]
pub created_time: Option<String>,
#[doc = "Domain expiration timestamp."]
#[serde(rename = "expirationTime", default, skip_serializing_if = "Option::is_none")]
pub expiration_time: Option<String>,
#[doc = "Timestamp when the domain was renewed last time."]
#[serde(rename = "lastRenewedTime", default, skip_serializing_if = "Option::is_none")]
pub last_renewed_time: Option<String>,
#[doc = "<code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>."]
#[serde(rename = "autoRenew", default, skip_serializing_if = "Option::is_none")]
pub auto_renew: Option<bool>,
#[doc = "<code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and \n it is hosted on name servers Azure has programmatic access to."]
#[serde(rename = "readyForDnsRecordManagement", default, skip_serializing_if = "Option::is_none")]
pub ready_for_dns_record_management: Option<bool>,
#[doc = "All hostnames derived from the domain and assigned to Azure resources."]
#[serde(rename = "managedHostNames", default, skip_serializing_if = "Vec::is_empty")]
pub managed_host_names: Vec<HostName>,
#[doc = "Domain purchase consent object, representing acceptance of applicable legal agreements."]
pub consent: DomainPurchaseConsent,
#[doc = "Reasons why domain is not renewable."]
#[serde(rename = "domainNotRenewableReasons", default, skip_serializing_if = "Vec::is_empty")]
pub domain_not_renewable_reasons: Vec<String>,
#[doc = "Current DNS type"]
#[serde(rename = "dnsType", default, skip_serializing_if = "Option::is_none")]
pub dns_type: Option<properties::DnsType>,
#[doc = "Azure DNS Zone to use"]
#[serde(rename = "dnsZoneId", default, skip_serializing_if = "Option::is_none")]
pub dns_zone_id: Option<String>,
#[doc = "Target DNS type (would be used for migration)"]
#[serde(rename = "targetDnsType", default, skip_serializing_if = "Option::is_none")]
pub target_dns_type: Option<properties::TargetDnsType>,
#[serde(rename = "authCode", default, skip_serializing_if = "Option::is_none")]
pub auth_code: Option<String>,
}
impl Properties {
pub fn new(
contact_admin: Contact,
contact_billing: Contact,
contact_registrant: Contact,
contact_tech: Contact,
consent: DomainPurchaseConsent,
) -> Self {
Self {
contact_admin,
contact_billing,
contact_registrant,
contact_tech,
registration_status: None,
provisioning_state: None,
name_servers: Vec::new(),
privacy: None,
created_time: None,
expiration_time: None,
last_renewed_time: None,
auto_renew: None,
ready_for_dns_record_management: None,
managed_host_names: Vec::new(),
consent,
domain_not_renewable_reasons: Vec::new(),
dns_type: None,
dns_zone_id: None,
target_dns_type: None,
auth_code: None,
}
}
}
pub mod properties {
use super::*;
#[doc = "Domain registration status."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum RegistrationStatus {
Active,
Awaiting,
Cancelled,
Confiscated,
Disabled,
Excluded,
Expired,
Failed,
Held,
Locked,
Parked,
Pending,
Reserved,
Reverted,
Suspended,
Transferred,
Unknown,
Unlocked,
Unparked,
Updated,
JsonConverterFailed,
}
#[doc = "Domain provisioning state."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum ProvisioningState {
Succeeded,
Failed,
Canceled,
InProgress,
Deleting,
}
#[doc = "Current DNS type"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum DnsType {
AzureDns,
DefaultDomainRegistrarDns,
}
#[doc = "Target DNS type (would be used for migration)"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum TargetDnsType {
AzureDns,
DefaultDomainRegistrarDns,
}
}
}
#[doc = "Domain availability check result."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DomainAvailablilityCheckResult {
#[doc = "Name of the domain."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "<code>true</code> if domain can be purchased using CreateDomain API; otherwise, <code>false</code>."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub available: Option<bool>,
#[doc = "Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost anything."]
#[serde(rename = "domainType", default, skip_serializing_if = "Option::is_none")]
pub domain_type: Option<domain_availablility_check_result::DomainType>,
}
impl DomainAvailablilityCheckResult {
pub fn new() -> Self {
Self::default()
}
}
pub mod domain_availablility_check_result {
use super::*;
#[doc = "Valid values are Regular domain: Azure will charge the full price of domain registration, SoftDeleted: Purchasing this domain will simply restore it and this operation will not cost anything."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum DomainType {
Regular,
SoftDeleted,
}
}
#[doc = "Collection of domains."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainCollection {
#[doc = "Collection of resources."]
pub value: Vec<Domain>,
#[doc = "Link to next page of resources."]
#[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
pub next_link: Option<String>,
}
impl DomainCollection {
pub fn new(value: Vec<Domain>) -> Self {
Self { value, next_link: None }
}
}
#[doc = "Single sign-on request information for domain management."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DomainControlCenterSsoRequest {
#[doc = "URL where the single sign-on request is to be made."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
#[doc = "Post parameter key."]
#[serde(rename = "postParameterKey", default, skip_serializing_if = "Option::is_none")]
pub post_parameter_key: Option<String>,
#[doc = "Post parameter value. Client should use 'application/x-www-form-urlencoded' encoding for this value."]
#[serde(rename = "postParameterValue", default, skip_serializing_if = "Option::is_none")]
pub post_parameter_value: Option<String>,
}
impl DomainControlCenterSsoRequest {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Domain ownership Identifier."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DomainOwnershipIdentifier {
#[serde(flatten)]
pub proxy_only_resource: ProxyOnlyResource,
#[doc = "DomainOwnershipIdentifier resource specific properties"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<domain_ownership_identifier::Properties>,
}
impl DomainOwnershipIdentifier {
pub fn new() -> Self {
Self::default()
}
}
pub mod domain_ownership_identifier {
use super::*;
#[doc = "DomainOwnershipIdentifier resource specific properties"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Properties {
#[doc = "Ownership Id."]
#[serde(rename = "ownershipId", default, skip_serializing_if = "Option::is_none")]
pub ownership_id: Option<String>,
}
impl Properties {
pub fn new() -> Self {
Self::default()
}
}
}
#[doc = "Collection of domain ownership identifiers."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct DomainOwnershipIdentifierCollection {
#[doc = "Collection of resources."]
pub value: Vec<DomainOwnershipIdentifier>,
#[doc = "Link to next page of resources."]
#[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
pub next_link: Option<String>,
}
impl DomainOwnershipIdentifierCollection {
pub fn new(value: Vec<DomainOwnershipIdentifier>) -> Self {
Self { value, next_link: None }
}
}
#[doc = "ARM resource for a domain."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DomainPatchResource {
#[serde(flatten)]
pub proxy_only_resource: ProxyOnlyResource,
#[doc = "DomainPatchResource resource specific properties"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<domain_patch_resource::Properties>,
}
impl DomainPatchResource {
pub fn new() -> Self {
Self::default()
}
}
pub mod domain_patch_resource {
use super::*;
#[doc = "DomainPatchResource resource specific properties"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct Properties {
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactAdmin")]
pub contact_admin: Contact,
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactBilling")]
pub contact_billing: Contact,
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactRegistrant")]
pub contact_registrant: Contact,
#[doc = "Contact information for domain registration. If 'Domain Privacy' option is not selected then the contact information is made publicly available through the Whois \ndirectories as per ICANN requirements."]
#[serde(rename = "contactTech")]
pub contact_tech: Contact,
#[doc = "Domain registration status."]
#[serde(rename = "registrationStatus", default, skip_serializing_if = "Option::is_none")]
pub registration_status: Option<properties::RegistrationStatus>,
#[doc = "Domain provisioning state."]
#[serde(rename = "provisioningState", default, skip_serializing_if = "Option::is_none")]
pub provisioning_state: Option<properties::ProvisioningState>,
#[doc = "Name servers."]
#[serde(rename = "nameServers", default, skip_serializing_if = "Vec::is_empty")]
pub name_servers: Vec<String>,
#[doc = "<code>true</code> if domain privacy is enabled for this domain; otherwise, <code>false</code>."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub privacy: Option<bool>,
#[doc = "Domain creation timestamp."]
#[serde(rename = "createdTime", default, skip_serializing_if = "Option::is_none")]
pub created_time: Option<String>,
#[doc = "Domain expiration timestamp."]
#[serde(rename = "expirationTime", default, skip_serializing_if = "Option::is_none")]
pub expiration_time: Option<String>,
#[doc = "Timestamp when the domain was renewed last time."]
#[serde(rename = "lastRenewedTime", default, skip_serializing_if = "Option::is_none")]
pub last_renewed_time: Option<String>,
#[doc = "<code>true</code> if the domain should be automatically renewed; otherwise, <code>false</code>."]
#[serde(rename = "autoRenew", default, skip_serializing_if = "Option::is_none")]
pub auto_renew: Option<bool>,
#[doc = "<code>true</code> if Azure can assign this domain to App Service apps; otherwise, <code>false</code>. This value will be <code>true</code> if domain registration status is active and \n it is hosted on name servers Azure has programmatic access to."]
#[serde(rename = "readyForDnsRecordManagement", default, skip_serializing_if = "Option::is_none")]
pub ready_for_dns_record_management: Option<bool>,
#[doc = "All hostnames derived from the domain and assigned to Azure resources."]
#[serde(rename = "managedHostNames", default, skip_serializing_if = "Vec::is_empty")]
pub managed_host_names: Vec<HostName>,
#[doc = "Domain purchase consent object, representing acceptance of applicable legal agreements."]
pub consent: DomainPurchaseConsent,
#[doc = "Reasons why domain is not renewable."]
#[serde(rename = "domainNotRenewableReasons", default, skip_serializing_if = "Vec::is_empty")]
pub domain_not_renewable_reasons: Vec<String>,
#[doc = "Current DNS type"]
#[serde(rename = "dnsType", default, skip_serializing_if = "Option::is_none")]
pub dns_type: Option<properties::DnsType>,
#[doc = "Azure DNS Zone to use"]
#[serde(rename = "dnsZoneId", default, skip_serializing_if = "Option::is_none")]
pub dns_zone_id: Option<String>,
#[doc = "Target DNS type (would be used for migration)"]
#[serde(rename = "targetDnsType", default, skip_serializing_if = "Option::is_none")]
pub target_dns_type: Option<properties::TargetDnsType>,
#[serde(rename = "authCode", default, skip_serializing_if = "Option::is_none")]
pub auth_code: Option<String>,
}
impl Properties {
pub fn new(
contact_admin: Contact,
contact_billing: Contact,
contact_registrant: Contact,
contact_tech: Contact,
consent: DomainPurchaseConsent,
) -> Self {
Self {
contact_admin,
contact_billing,
contact_registrant,
contact_tech,
registration_status: None,
provisioning_state: None,
name_servers: Vec::new(),
privacy: None,
created_time: None,
expiration_time: None,
last_renewed_time: None,
auto_renew: None,
ready_for_dns_record_management: None,
managed_host_names: Vec::new(),
consent,
domain_not_renewable_reasons: Vec::new(),
dns_type: None,
dns_zone_id: None,
target_dns_type: None,
auth_code: None,
}
}
}
pub mod properties {
use super::*;
#[doc = "Domain registration status."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum RegistrationStatus {
Active,
Awaiting,
Cancelled,
Confiscated,
Disabled,
Excluded,
Expired,
Failed,
Held,
Locked,
Parked,
Pending,
Reserved,
Reverted,
Suspended,
Transferred,
Unknown,
Unlocked,
Unparked,
Updated,
JsonConverterFailed,
}
#[doc = "Domain provisioning state."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum ProvisioningState {
Succeeded,
Failed,
Canceled,
InProgress,
Deleting,
}
#[doc = "Current DNS type"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum DnsType {
AzureDns,
DefaultDomainRegistrarDns,
}
#[doc = "Target DNS type (would be used for migration)"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum TargetDnsType {
AzureDns,
DefaultDomainRegistrarDns,
}
}
}
#[doc = "Domain purchase consent object, representing acceptance of applicable legal agreements."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DomainPurchaseConsent {
#[doc = "List of applicable legal agreement keys. This list can be retrieved using ListLegalAgreements API under <code>TopLevelDomain</code> resource."]
#[serde(rename = "agreementKeys", default, skip_serializing_if = "Vec::is_empty")]
pub agreement_keys: Vec<String>,
#[doc = "Client IP address."]
#[serde(rename = "agreedBy", default, skip_serializing_if = "Option::is_none")]
pub agreed_by: Option<String>,
#[doc = "Timestamp when the agreements were accepted."]
#[serde(rename = "agreedAt", default, skip_serializing_if = "Option::is_none")]
pub agreed_at: Option<String>,
}
impl DomainPurchaseConsent {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Domain recommendation search parameters."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct DomainRecommendationSearchParameters {
#[doc = "Keywords to be used for generating domain recommendations."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub keywords: Option<String>,
#[doc = "Maximum number of recommendations."]
#[serde(rename = "maxDomainRecommendations", default, skip_serializing_if = "Option::is_none")]
pub max_domain_recommendations: Option<i32>,
}
impl DomainRecommendationSearchParameters {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Error Response."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ErrorResponse {
#[doc = "Error code."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub code: Option<String>,
#[doc = "Error message indicating why the operation failed."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub message: Option<String>,
}
impl ErrorResponse {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Details of a hostname derived from a domain."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct HostName {
#[doc = "Name of the hostname."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "List of apps the hostname is assigned to. This list will have more than one app only if the hostname is pointing to a Traffic Manager."]
#[serde(rename = "siteNames", default, skip_serializing_if = "Vec::is_empty")]
pub site_names: Vec<String>,
#[doc = "Name of the Azure resource the hostname is assigned to. If it is assigned to a Traffic Manager then it will be the Traffic Manager name otherwise it will be the app name."]
#[serde(rename = "azureResourceName", default, skip_serializing_if = "Option::is_none")]
pub azure_resource_name: Option<String>,
#[doc = "Type of the Azure resource the hostname is assigned to."]
#[serde(rename = "azureResourceType", default, skip_serializing_if = "Option::is_none")]
pub azure_resource_type: Option<host_name::AzureResourceType>,
#[doc = "Type of the DNS record."]
#[serde(rename = "customHostNameDnsRecordType", default, skip_serializing_if = "Option::is_none")]
pub custom_host_name_dns_record_type: Option<host_name::CustomHostNameDnsRecordType>,
#[doc = "Type of the hostname."]
#[serde(rename = "hostNameType", default, skip_serializing_if = "Option::is_none")]
pub host_name_type: Option<host_name::HostNameType>,
}
impl HostName {
pub fn new() -> Self {
Self::default()
}
}
pub mod host_name {
use super::*;
#[doc = "Type of the Azure resource the hostname is assigned to."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum AzureResourceType {
Website,
TrafficManager,
}
#[doc = "Type of the DNS record."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum CustomHostNameDnsRecordType {
CName,
A,
}
#[doc = "Type of the hostname."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub enum HostNameType {
Verified,
Managed,
}
}
#[doc = "Retention policy of a resource metric."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct MetricAvailability {
#[serde(rename = "timeGrain", default, skip_serializing_if = "Option::is_none")]
pub time_grain: Option<String>,
#[serde(rename = "blobDuration", default, skip_serializing_if = "Option::is_none")]
pub blob_duration: Option<String>,
}
impl MetricAvailability {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Definition of a single resource metric."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct MetricSpecification {
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[serde(rename = "displayName", default, skip_serializing_if = "Option::is_none")]
pub display_name: Option<String>,
#[serde(rename = "displayDescription", default, skip_serializing_if = "Option::is_none")]
pub display_description: Option<String>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub unit: Option<String>,
#[serde(rename = "aggregationType", default, skip_serializing_if = "Option::is_none")]
pub aggregation_type: Option<String>,
#[serde(rename = "supportsInstanceLevelAggregation", default, skip_serializing_if = "Option::is_none")]
pub supports_instance_level_aggregation: Option<bool>,
#[serde(rename = "enableRegionalMdmAccount", default, skip_serializing_if = "Option::is_none")]
pub enable_regional_mdm_account: Option<bool>,
#[serde(rename = "sourceMdmAccount", default, skip_serializing_if = "Option::is_none")]
pub source_mdm_account: Option<String>,
#[serde(rename = "sourceMdmNamespace", default, skip_serializing_if = "Option::is_none")]
pub source_mdm_namespace: Option<String>,
#[serde(rename = "metricFilterPattern", default, skip_serializing_if = "Option::is_none")]
pub metric_filter_pattern: Option<String>,
#[serde(rename = "fillGapWithZero", default, skip_serializing_if = "Option::is_none")]
pub fill_gap_with_zero: Option<bool>,
#[serde(rename = "isInternal", default, skip_serializing_if = "Option::is_none")]
pub is_internal: Option<bool>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub dimensions: Vec<Dimension>,
#[serde(default, skip_serializing_if = "Option::is_none")]
pub category: Option<String>,
#[serde(default, skip_serializing_if = "Vec::is_empty")]
pub availabilities: Vec<MetricAvailability>,
}
impl MetricSpecification {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Identifies an object."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct NameIdentifier {
#[doc = "Name of the object."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
}
impl NameIdentifier {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Collection of domain name identifiers."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct NameIdentifierCollection {
#[doc = "Collection of resources."]
pub value: Vec<NameIdentifier>,
#[doc = "Link to next page of resources."]
#[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
pub next_link: Option<String>,
}
impl NameIdentifierCollection {
pub fn new(value: Vec<NameIdentifier>) -> Self {
Self { value, next_link: None }
}
}
#[doc = "Azure proxy only resource. This resource is not tracked by Azure Resource Manager."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ProxyOnlyResource {
#[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 = "Kind of resource."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
#[doc = "Resource type."]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<String>,
}
impl ProxyOnlyResource {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Azure resource. This resource is tracked in Azure Resource Manager"]
#[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 = "Kind of resource."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
#[doc = "Resource Location."]
pub location: String,
#[doc = "Resource type."]
#[serde(rename = "type", default, skip_serializing_if = "Option::is_none")]
pub type_: Option<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,
kind: None,
location,
type_: None,
tags: None,
}
}
}
#[doc = "Resource metrics service provided by Microsoft.Insights resource provider."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct ServiceSpecification {
#[serde(rename = "metricSpecifications", default, skip_serializing_if = "Vec::is_empty")]
pub metric_specifications: Vec<MetricSpecification>,
}
impl ServiceSpecification {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Legal agreement for a top level domain."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct TldLegalAgreement {
#[doc = "Unique identifier for the agreement."]
#[serde(rename = "agreementKey")]
pub agreement_key: String,
#[doc = "Agreement title."]
pub title: String,
#[doc = "Agreement details."]
pub content: String,
#[doc = "URL where a copy of the agreement details is hosted."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub url: Option<String>,
}
impl TldLegalAgreement {
pub fn new(agreement_key: String, title: String, content: String) -> Self {
Self {
agreement_key,
title,
content,
url: None,
}
}
}
#[doc = "Collection of top-level domain legal agreements."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct TldLegalAgreementCollection {
#[doc = "Collection of resources."]
pub value: Vec<TldLegalAgreement>,
#[doc = "Link to next page of resources."]
#[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
pub next_link: Option<String>,
}
impl TldLegalAgreementCollection {
pub fn new(value: Vec<TldLegalAgreement>) -> Self {
Self { value, next_link: None }
}
}
#[doc = "A top level domain object."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct TopLevelDomain {
#[serde(flatten)]
pub proxy_only_resource: ProxyOnlyResource,
#[doc = "TopLevelDomain resource specific properties"]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub properties: Option<top_level_domain::Properties>,
}
impl TopLevelDomain {
pub fn new() -> Self {
Self::default()
}
}
pub mod top_level_domain {
use super::*;
#[doc = "TopLevelDomain resource specific properties"]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct Properties {
#[doc = "Name of the top level domain."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub name: Option<String>,
#[doc = "If <code>true</code>, then the top level domain supports domain privacy; otherwise, <code>false</code>."]
#[serde(default, skip_serializing_if = "Option::is_none")]
pub privacy: Option<bool>,
}
impl Properties {
pub fn new() -> Self {
Self::default()
}
}
}
#[doc = "Options for retrieving the list of top level domain legal agreements."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize, Default)]
pub struct TopLevelDomainAgreementOption {
#[doc = "If <code>true</code>, then the list of agreements will include agreements for domain privacy as well; otherwise, <code>false</code>."]
#[serde(rename = "includePrivacy", default, skip_serializing_if = "Option::is_none")]
pub include_privacy: Option<bool>,
#[doc = "If <code>true</code>, then the list of agreements will include agreements for domain transfer as well; otherwise, <code>false</code>."]
#[serde(rename = "forTransfer", default, skip_serializing_if = "Option::is_none")]
pub for_transfer: Option<bool>,
}
impl TopLevelDomainAgreementOption {
pub fn new() -> Self {
Self::default()
}
}
#[doc = "Collection of Top-level domains."]
#[derive(Clone, Debug, PartialEq, Serialize, Deserialize)]
pub struct TopLevelDomainCollection {
#[doc = "Collection of resources."]
pub value: Vec<TopLevelDomain>,
#[doc = "Link to next page of resources."]
#[serde(rename = "nextLink", default, skip_serializing_if = "Option::is_none")]
pub next_link: Option<String>,
}
impl TopLevelDomainCollection {
pub fn new(value: Vec<TopLevelDomain>) -> Self {
Self { value, next_link: None }
}
}