// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct DomainPropertiesData : DomainPropertiesProtocol {
    public var contactAdmin: ContactProtocol?
    public var contactBilling: ContactProtocol?
    public var contactRegistrant: ContactProtocol?
    public var contactTech: ContactProtocol?
    public var registrationStatus: DomainStatusEnum?
    public var provisioningState: ProvisioningStateEnum?
    public var nameServers: [String]?
    public var privacy: Bool?
    public var createdTime: Date?
    public var expirationTime: Date?
    public var lastRenewedTime: Date?
    public var autoRenew: Bool?
    public var readyForDnsRecordManagement: Bool?
    public var managedHostNames: [HostNameProtocol?]?
    public var consent: DomainPurchaseConsentProtocol?
    public var domainNotRenewableReasons: [String?]?
    public var dnsType: DnsTypeEnum?
    public var dnsZoneId: String?
    public var targetDnsType: DnsTypeEnum?
    public var authCode: String?

        enum CodingKeys: String, CodingKey {case contactAdmin = "contactAdmin"
        case contactBilling = "contactBilling"
        case contactRegistrant = "contactRegistrant"
        case contactTech = "contactTech"
        case registrationStatus = "registrationStatus"
        case provisioningState = "provisioningState"
        case nameServers = "nameServers"
        case privacy = "privacy"
        case createdTime = "createdTime"
        case expirationTime = "expirationTime"
        case lastRenewedTime = "lastRenewedTime"
        case autoRenew = "autoRenew"
        case readyForDnsRecordManagement = "readyForDnsRecordManagement"
        case managedHostNames = "managedHostNames"
        case consent = "consent"
        case domainNotRenewableReasons = "domainNotRenewableReasons"
        case dnsType = "dnsType"
        case dnsZoneId = "dnsZoneId"
        case targetDnsType = "targetDnsType"
        case authCode = "authCode"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.contactAdmin) {
        self.contactAdmin = try container.decode(ContactData?.self, forKey: .contactAdmin)
    }
    if container.contains(.contactBilling) {
        self.contactBilling = try container.decode(ContactData?.self, forKey: .contactBilling)
    }
    if container.contains(.contactRegistrant) {
        self.contactRegistrant = try container.decode(ContactData?.self, forKey: .contactRegistrant)
    }
    if container.contains(.contactTech) {
        self.contactTech = try container.decode(ContactData?.self, forKey: .contactTech)
    }
    if container.contains(.registrationStatus) {
        self.registrationStatus = try container.decode(DomainStatusEnum?.self, forKey: .registrationStatus)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(ProvisioningStateEnum?.self, forKey: .provisioningState)
    }
    if container.contains(.nameServers) {
        self.nameServers = try container.decode([String]?.self, forKey: .nameServers)
    }
    if container.contains(.privacy) {
        self.privacy = try container.decode(Bool?.self, forKey: .privacy)
    }
    if container.contains(.createdTime) {
        self.createdTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .createdTime)), format: .dateTime)
    }
    if container.contains(.expirationTime) {
        self.expirationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .expirationTime)), format: .dateTime)
    }
    if container.contains(.lastRenewedTime) {
        self.lastRenewedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastRenewedTime)), format: .dateTime)
    }
    if container.contains(.autoRenew) {
        self.autoRenew = try container.decode(Bool?.self, forKey: .autoRenew)
    }
    if container.contains(.readyForDnsRecordManagement) {
        self.readyForDnsRecordManagement = try container.decode(Bool?.self, forKey: .readyForDnsRecordManagement)
    }
    if container.contains(.managedHostNames) {
        self.managedHostNames = try container.decode([HostNameData?]?.self, forKey: .managedHostNames)
    }
    if container.contains(.consent) {
        self.consent = try container.decode(DomainPurchaseConsentData?.self, forKey: .consent)
    }
    if container.contains(.domainNotRenewableReasons) {
        self.domainNotRenewableReasons = try container.decode([String?]?.self, forKey: .domainNotRenewableReasons)
    }
    if container.contains(.dnsType) {
        self.dnsType = try container.decode(DnsTypeEnum?.self, forKey: .dnsType)
    }
    if container.contains(.dnsZoneId) {
        self.dnsZoneId = try container.decode(String?.self, forKey: .dnsZoneId)
    }
    if container.contains(.targetDnsType) {
        self.targetDnsType = try container.decode(DnsTypeEnum?.self, forKey: .targetDnsType)
    }
    if container.contains(.authCode) {
        self.authCode = try container.decode(String?.self, forKey: .authCode)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.contactAdmin != nil {try container.encode(self.contactAdmin as! ContactData?, forKey: .contactAdmin)}
    if self.contactBilling != nil {try container.encode(self.contactBilling as! ContactData?, forKey: .contactBilling)}
    if self.contactRegistrant != nil {try container.encode(self.contactRegistrant as! ContactData?, forKey: .contactRegistrant)}
    if self.contactTech != nil {try container.encode(self.contactTech as! ContactData?, forKey: .contactTech)}
    if self.registrationStatus != nil {try container.encode(self.registrationStatus, forKey: .registrationStatus)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.nameServers != nil {try container.encode(self.nameServers as! [String]?, forKey: .nameServers)}
    if self.privacy != nil {try container.encode(self.privacy, forKey: .privacy)}
    if self.createdTime != nil {
        try container.encode(DateConverter.toString(date: self.createdTime!, format: .dateTime), forKey: .createdTime)
    }
    if self.expirationTime != nil {
        try container.encode(DateConverter.toString(date: self.expirationTime!, format: .dateTime), forKey: .expirationTime)
    }
    if self.lastRenewedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastRenewedTime!, format: .dateTime), forKey: .lastRenewedTime)
    }
    if self.autoRenew != nil {try container.encode(self.autoRenew, forKey: .autoRenew)}
    if self.readyForDnsRecordManagement != nil {try container.encode(self.readyForDnsRecordManagement, forKey: .readyForDnsRecordManagement)}
    if self.managedHostNames != nil {try container.encode(self.managedHostNames as! [HostNameData?]?, forKey: .managedHostNames)}
    if self.consent != nil {try container.encode(self.consent as! DomainPurchaseConsentData?, forKey: .consent)}
    if self.domainNotRenewableReasons != nil {try container.encode(self.domainNotRenewableReasons as! [String?]?, forKey: .domainNotRenewableReasons)}
    if self.dnsType != nil {try container.encode(self.dnsType, forKey: .dnsType)}
    if self.dnsZoneId != nil {try container.encode(self.dnsZoneId, forKey: .dnsZoneId)}
    if self.targetDnsType != nil {try container.encode(self.targetDnsType, forKey: .targetDnsType)}
    if self.authCode != nil {try container.encode(self.authCode, forKey: .authCode)}
  }
}

extension DataFactory {
  public static func createDomainPropertiesProtocol() -> DomainPropertiesProtocol {
    return DomainPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct DomainPurchaseConsentData : DomainPurchaseConsentProtocol {
    public var agreementKeys: [String]?
    public var agreedBy: String?
    public var agreedAt: Date?

        enum CodingKeys: String, CodingKey {case agreementKeys = "agreementKeys"
        case agreedBy = "agreedBy"
        case agreedAt = "agreedAt"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.agreementKeys) {
        self.agreementKeys = try container.decode([String]?.self, forKey: .agreementKeys)
    }
    if container.contains(.agreedBy) {
        self.agreedBy = try container.decode(String?.self, forKey: .agreedBy)
    }
    if container.contains(.agreedAt) {
        self.agreedAt = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .agreedAt)), format: .dateTime)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.agreementKeys != nil {try container.encode(self.agreementKeys as! [String]?, forKey: .agreementKeys)}
    if self.agreedBy != nil {try container.encode(self.agreedBy, forKey: .agreedBy)}
    if self.agreedAt != nil {
        try container.encode(DateConverter.toString(date: self.agreedAt!, format: .dateTime), forKey: .agreedAt)
    }
  }
}

extension DataFactory {
  public static func createDomainPurchaseConsentProtocol() -> DomainPurchaseConsentProtocol {
    return DomainPurchaseConsentData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct DomainRecommendationSearchParametersData : DomainRecommendationSearchParametersProtocol {
    public var keywords: String?
    public var maxDomainRecommendations: Int32?

        enum CodingKeys: String, CodingKey {case keywords = "keywords"
        case maxDomainRecommendations = "maxDomainRecommendations"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.keywords) {
        self.keywords = try container.decode(String?.self, forKey: .keywords)
    }
    if container.contains(.maxDomainRecommendations) {
        self.maxDomainRecommendations = try container.decode(Int32?.self, forKey: .maxDomainRecommendations)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.keywords != nil {try container.encode(self.keywords, forKey: .keywords)}
    if self.maxDomainRecommendations != nil {try container.encode(self.maxDomainRecommendations, forKey: .maxDomainRecommendations)}
  }
}

extension DataFactory {
  public static func createDomainRecommendationSearchParametersProtocol() -> DomainRecommendationSearchParametersProtocol {
    return DomainRecommendationSearchParametersData()
  }
}


// DomainStatus enumerates the values for domain status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum DomainStatusEnum: String, Codable
{
// DomainStatusActive specifies the domain status active state for domain status.
    case DomainStatusActive = "Active"
// DomainStatusAwaiting specifies the domain status awaiting state for domain status.
    case DomainStatusAwaiting = "Awaiting"
// DomainStatusCancelled specifies the domain status cancelled state for domain status.
    case DomainStatusCancelled = "Cancelled"
// DomainStatusConfiscated specifies the domain status confiscated state for domain status.
    case DomainStatusConfiscated = "Confiscated"
// DomainStatusDisabled specifies the domain status disabled state for domain status.
    case DomainStatusDisabled = "Disabled"
// DomainStatusExcluded specifies the domain status excluded state for domain status.
    case DomainStatusExcluded = "Excluded"
// DomainStatusExpired specifies the domain status expired state for domain status.
    case DomainStatusExpired = "Expired"
// DomainStatusFailed specifies the domain status failed state for domain status.
    case DomainStatusFailed = "Failed"
// DomainStatusHeld specifies the domain status held state for domain status.
    case DomainStatusHeld = "Held"
// DomainStatusJsonConverterFailed specifies the domain status json converter failed state for domain status.
    case DomainStatusJsonConverterFailed = "JsonConverterFailed"
// DomainStatusLocked specifies the domain status locked state for domain status.
    case DomainStatusLocked = "Locked"
// DomainStatusParked specifies the domain status parked state for domain status.
    case DomainStatusParked = "Parked"
// DomainStatusPending specifies the domain status pending state for domain status.
    case DomainStatusPending = "Pending"
// DomainStatusReserved specifies the domain status reserved state for domain status.
    case DomainStatusReserved = "Reserved"
// DomainStatusReverted specifies the domain status reverted state for domain status.
    case DomainStatusReverted = "Reverted"
// DomainStatusSuspended specifies the domain status suspended state for domain status.
    case DomainStatusSuspended = "Suspended"
// DomainStatusTransferred specifies the domain status transferred state for domain status.
    case DomainStatusTransferred = "Transferred"
// DomainStatusUnknown specifies the domain status unknown state for domain status.
    case DomainStatusUnknown = "Unknown"
// DomainStatusUnlocked specifies the domain status unlocked state for domain status.
    case DomainStatusUnlocked = "Unlocked"
// DomainStatusUnparked specifies the domain status unparked state for domain status.
    case DomainStatusUnparked = "Unparked"
// DomainStatusUpdated specifies the domain status updated state for domain status.
    case DomainStatusUpdated = "Updated"
}


// DomainType enumerates the values for domain type.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum DomainTypeEnum: String, Codable
{
// Regular specifies the regular state for domain type.
    case Regular = "Regular"
// SoftDeleted specifies the soft deleted state for domain type.
    case SoftDeleted = "SoftDeleted"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct EnabledConfigData : EnabledConfigProtocol {
    public var enabled: Bool?

        enum CodingKeys: String, CodingKey {case enabled = "enabled"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.enabled) {
        self.enabled = try container.decode(Bool?.self, forKey: .enabled)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.enabled != nil {try container.encode(self.enabled, forKey: .enabled)}
  }
}

extension DataFactory {
  public static func createEnabledConfigProtocol() -> EnabledConfigProtocol {
    return EnabledConfigData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct ErrorEntityData : ErrorEntityProtocol {
    public var extendedCode: String?
    public var messageTemplate: String?
    public var parameters: [String]?
    public var innerErrors: [ErrorEntityProtocol?]?
    public var code: String?
    public var message: String?

        enum CodingKeys: String, CodingKey {case extendedCode = "extendedCode"
        case messageTemplate = "messageTemplate"
        case parameters = "parameters"
        case innerErrors = "innerErrors"
        case code = "code"
        case message = "message"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.extendedCode) {
        self.extendedCode = try container.decode(String?.self, forKey: .extendedCode)
    }
    if container.contains(.messageTemplate) {
        self.messageTemplate = try container.decode(String?.self, forKey: .messageTemplate)
    }
    if container.contains(.parameters) {
        self.parameters = try container.decode([String]?.self, forKey: .parameters)
    }
    if container.contains(.innerErrors) {
        self.innerErrors = try container.decode([ErrorEntityData?]?.self, forKey: .innerErrors)
    }
    if container.contains(.code) {
        self.code = try container.decode(String?.self, forKey: .code)
    }
    if container.contains(.message) {
        self.message = try container.decode(String?.self, forKey: .message)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.extendedCode != nil {try container.encode(self.extendedCode, forKey: .extendedCode)}
    if self.messageTemplate != nil {try container.encode(self.messageTemplate, forKey: .messageTemplate)}
    if self.parameters != nil {try container.encode(self.parameters as! [String]?, forKey: .parameters)}
    if self.innerErrors != nil {try container.encode(self.innerErrors as! [ErrorEntityData?]?, forKey: .innerErrors)}
    if self.code != nil {try container.encode(self.code, forKey: .code)}
    if self.message != nil {try container.encode(self.message, forKey: .message)}
  }
}

extension DataFactory {
  public static func createErrorEntityProtocol() -> ErrorEntityProtocol {
    return ErrorEntityData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct ErrorResponseData : ErrorResponseProtocol {
    public var code: String?
    public var message: String?

        enum CodingKeys: String, CodingKey {case code = "code"
        case message = "message"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.code) {
        self.code = try container.decode(String?.self, forKey: .code)
    }
    if container.contains(.message) {
        self.message = try container.decode(String?.self, forKey: .message)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.code != nil {try container.encode(self.code, forKey: .code)}
    if self.message != nil {try container.encode(self.message, forKey: .message)}
  }
}

extension DataFactory {
  public static func createErrorResponseProtocol() -> ErrorResponseProtocol {
    return ErrorResponseData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct ExperimentsData : ExperimentsProtocol {
    public var rampUpRules: [RampUpRuleProtocol?]?

        enum CodingKeys: String, CodingKey {case rampUpRules = "rampUpRules"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.rampUpRules) {
        self.rampUpRules = try container.decode([RampUpRuleData?]?.self, forKey: .rampUpRules)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.rampUpRules != nil {try container.encode(self.rampUpRules as! [RampUpRuleData?]?, forKey: .rampUpRules)}
  }
}

extension DataFactory {
  public static func createExperimentsProtocol() -> ExperimentsProtocol {
    return ExperimentsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct FileSystemApplicationLogsConfigData : FileSystemApplicationLogsConfigProtocol {
    public var level: LogLevelEnum?

        enum CodingKeys: String, CodingKey {case level = "level"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.level) {
        self.level = try container.decode(LogLevelEnum?.self, forKey: .level)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.level != nil {try container.encode(self.level, forKey: .level)}
  }
}

extension DataFactory {
  public static func createFileSystemApplicationLogsConfigProtocol() -> FileSystemApplicationLogsConfigProtocol {
    return FileSystemApplicationLogsConfigData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct FileSystemHttpLogsConfigData : FileSystemHttpLogsConfigProtocol {
    public var retentionInMb: Int32?
    public var retentionInDays: Int32?
    public var enabled: Bool?

        enum CodingKeys: String, CodingKey {case retentionInMb = "retentionInMb"
        case retentionInDays = "retentionInDays"
        case enabled = "enabled"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.retentionInMb) {
        self.retentionInMb = try container.decode(Int32?.self, forKey: .retentionInMb)
    }
    if container.contains(.retentionInDays) {
        self.retentionInDays = try container.decode(Int32?.self, forKey: .retentionInDays)
    }
    if container.contains(.enabled) {
        self.enabled = try container.decode(Bool?.self, forKey: .enabled)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.retentionInMb != nil {try container.encode(self.retentionInMb, forKey: .retentionInMb)}
    if self.retentionInDays != nil {try container.encode(self.retentionInDays, forKey: .retentionInDays)}
    if self.enabled != nil {try container.encode(self.enabled, forKey: .enabled)}
  }
}

extension DataFactory {
  public static func createFileSystemHttpLogsConfigProtocol() -> FileSystemHttpLogsConfigProtocol {
    return FileSystemHttpLogsConfigData()
  }
}


// FrequencyUnit enumerates the values for frequency unit.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum FrequencyUnitEnum: String, Codable
{
// Day specifies the day state for frequency unit.
    case Day = "Day"
// Hour specifies the hour state for frequency unit.
    case Hour = "Hour"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct FunctionEnvelopeCollectionData : FunctionEnvelopeCollectionProtocol {
    public var value: [FunctionEnvelopeProtocol]
    public var _nextLink: String?

        enum CodingKeys: String, CodingKey {case value = "value"
        case _nextLink = "nextLink"
        }

  public init(value: [FunctionEnvelopeProtocol])  {
    self.value = value
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([FunctionEnvelopeData].self, forKey: .value)
    if container.contains(._nextLink) {
        self._nextLink = try container.decode(String?.self, forKey: ._nextLink)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.value as! [FunctionEnvelopeData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createFunctionEnvelopeCollectionProtocol(value: [FunctionEnvelopeProtocol]) -> FunctionEnvelopeCollectionProtocol {
    return FunctionEnvelopeCollectionData(value: value)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct FunctionEnvelopeData : FunctionEnvelopeProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: FunctionEnvelopePropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(FunctionEnvelopePropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! FunctionEnvelopePropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createFunctionEnvelopeProtocol() -> FunctionEnvelopeProtocol {
    return FunctionEnvelopeData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct FunctionEnvelopePropertiesData : FunctionEnvelopePropertiesProtocol {
    public var name: String?
    public var functionAppId: String?
    public var scriptRootPathHref: String?
    public var scriptHref: String?
    public var configHref: String?
    public var secretsFileHref: String?
    public var href: String?
    public var config: [String: String?]?
    public var files: [String:String]?
    public var testData: String?

        enum CodingKeys: String, CodingKey {case name = "name"
        case functionAppId = "functionAppId"
        case scriptRootPathHref = "scriptRootPathHref"
        case scriptHref = "scriptHref"
        case configHref = "configHref"
        case secretsFileHref = "secretsFileHref"
        case href = "href"
        case config = "config"
        case files = "files"
        case testData = "testData"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.functionAppId) {
        self.functionAppId = try container.decode(String?.self, forKey: .functionAppId)
    }
    if container.contains(.scriptRootPathHref) {
        self.scriptRootPathHref = try container.decode(String?.self, forKey: .scriptRootPathHref)
    }
    if container.contains(.scriptHref) {
        self.scriptHref = try container.decode(String?.self, forKey: .scriptHref)
    }
    if container.contains(.configHref) {
        self.configHref = try container.decode(String?.self, forKey: .configHref)
    }
    if container.contains(.secretsFileHref) {
        self.secretsFileHref = try container.decode(String?.self, forKey: .secretsFileHref)
    }
    if container.contains(.href) {
        self.href = try container.decode(String?.self, forKey: .href)
    }
    if container.contains(.config) {
        self.config = try container.decode([String: String?]?.self, forKey: .config)
    }
    if container.contains(.files) {
        self.files = try container.decode([String:String]?.self, forKey: .files)
    }
    if container.contains(.testData) {
        self.testData = try container.decode(String?.self, forKey: .testData)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.functionAppId != nil {try container.encode(self.functionAppId, forKey: .functionAppId)}
    if self.scriptRootPathHref != nil {try container.encode(self.scriptRootPathHref, forKey: .scriptRootPathHref)}
    if self.scriptHref != nil {try container.encode(self.scriptHref, forKey: .scriptHref)}
    if self.configHref != nil {try container.encode(self.configHref, forKey: .configHref)}
    if self.secretsFileHref != nil {try container.encode(self.secretsFileHref, forKey: .secretsFileHref)}
    if self.href != nil {try container.encode(self.href, forKey: .href)}
    if self.config != nil {try container.encode(self.config, forKey: .config)}
    if self.files != nil {try container.encode(self.files, forKey: .files)}
    if self.testData != nil {try container.encode(self.testData, forKey: .testData)}
  }
}

extension DataFactory {
  public static func createFunctionEnvelopePropertiesProtocol() -> FunctionEnvelopePropertiesProtocol {
    return FunctionEnvelopePropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct FunctionSecretsData : FunctionSecretsProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: FunctionSecretsPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(FunctionSecretsPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! FunctionSecretsPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createFunctionSecretsProtocol() -> FunctionSecretsProtocol {
    return FunctionSecretsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct FunctionSecretsPropertiesData : FunctionSecretsPropertiesProtocol {
    public var key: String?
    public var triggerUrl: String?

        enum CodingKeys: String, CodingKey {case key = "key"
        case triggerUrl = "triggerUrl"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.key) {
        self.key = try container.decode(String?.self, forKey: .key)
    }
    if container.contains(.triggerUrl) {
        self.triggerUrl = try container.decode(String?.self, forKey: .triggerUrl)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.key != nil {try container.encode(self.key, forKey: .key)}
    if self.triggerUrl != nil {try container.encode(self.triggerUrl, forKey: .triggerUrl)}
  }
}

extension DataFactory {
  public static func createFunctionSecretsPropertiesProtocol() -> FunctionSecretsPropertiesProtocol {
    return FunctionSecretsPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct GeoRegionCollectionData : GeoRegionCollectionProtocol {
    public var value: [GeoRegionProtocol]
    public var _nextLink: String?

        enum CodingKeys: String, CodingKey {case value = "value"
        case _nextLink = "nextLink"
        }

  public init(value: [GeoRegionProtocol])  {
    self.value = value
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([GeoRegionData].self, forKey: .value)
    if container.contains(._nextLink) {
        self._nextLink = try container.decode(String?.self, forKey: ._nextLink)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.value as! [GeoRegionData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createGeoRegionCollectionProtocol(value: [GeoRegionProtocol]) -> GeoRegionCollectionProtocol {
    return GeoRegionCollectionData(value: value)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct GeoRegionData : GeoRegionProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: GeoRegionPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(GeoRegionPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! GeoRegionPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createGeoRegionProtocol() -> GeoRegionProtocol {
    return GeoRegionData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct GeoRegionPropertiesData : GeoRegionPropertiesProtocol {
    public var name: String?
    public var description: String?
    public var displayName: String?

        enum CodingKeys: String, CodingKey {case name = "name"
        case description = "description"
        case displayName = "displayName"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    if container.contains(.displayName) {
        self.displayName = try container.decode(String?.self, forKey: .displayName)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
    if self.displayName != nil {try container.encode(self.displayName, forKey: .displayName)}
  }
}

extension DataFactory {
  public static func createGeoRegionPropertiesProtocol() -> GeoRegionPropertiesProtocol {
    return GeoRegionPropertiesData()
  }
}


// GetAvailableStacksOnPremOsTypeSelected enumerates the values for get available stacks on prem os type selected.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum GetAvailableStacksOnPremOsTypeSelectedEnum: String, Codable
{
// Linux specifies the linux state for get available stacks on prem os type selected.
    case Linux = "Linux"
// Windows specifies the windows state for get available stacks on prem os type selected.
    case Windows = "Windows"
}


// GetAvailableStacksOsTypeSelected enumerates the values for get available stacks os type selected.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum GetAvailableStacksOsTypeSelectedEnum: String, Codable
{
// GetAvailableStacksOsTypeSelectedLinux specifies the get available stacks os type selected linux state for get
// available stacks os type selected.
    case GetAvailableStacksOsTypeSelectedLinux = "Linux"
// GetAvailableStacksOsTypeSelectedWindows specifies the get available stacks os type selected windows state for get
// available stacks os type selected.
    case GetAvailableStacksOsTypeSelectedWindows = "Windows"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct GlobalCsmSkuDescriptionData : GlobalCsmSkuDescriptionProtocol {
    public var name: String?
    public var tier: String?
    public var size: String?
    public var family: String?
    public var capacity: SkuCapacityProtocol?
    public var locations: [String]?
    public var capabilities: [CapabilityProtocol?]?

        enum CodingKeys: String, CodingKey {case name = "name"
        case tier = "tier"
        case size = "size"
        case family = "family"
        case capacity = "capacity"
        case locations = "locations"
        case capabilities = "capabilities"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.tier) {
        self.tier = try container.decode(String?.self, forKey: .tier)
    }
    if container.contains(.size) {
        self.size = try container.decode(String?.self, forKey: .size)
    }
    if container.contains(.family) {
        self.family = try container.decode(String?.self, forKey: .family)
    }
    if container.contains(.capacity) {
        self.capacity = try container.decode(SkuCapacityData?.self, forKey: .capacity)
    }
    if container.contains(.locations) {
        self.locations = try container.decode([String]?.self, forKey: .locations)
    }
    if container.contains(.capabilities) {
        self.capabilities = try container.decode([CapabilityData?]?.self, forKey: .capabilities)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.tier != nil {try container.encode(self.tier, forKey: .tier)}
    if self.size != nil {try container.encode(self.size, forKey: .size)}
    if self.family != nil {try container.encode(self.family, forKey: .family)}
    if self.capacity != nil {try container.encode(self.capacity as! SkuCapacityData?, forKey: .capacity)}
    if self.locations != nil {try container.encode(self.locations as! [String]?, forKey: .locations)}
    if self.capabilities != nil {try container.encode(self.capabilities as! [CapabilityData?]?, forKey: .capabilities)}
  }
}

extension DataFactory {
  public static func createGlobalCsmSkuDescriptionProtocol() -> GlobalCsmSkuDescriptionProtocol {
    return GlobalCsmSkuDescriptionData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HandlerMappingData : HandlerMappingProtocol {
    public var _extension: String?
    public var scriptProcessor: String?
    public var arguments: String?

        enum CodingKeys: String, CodingKey {case _extension = "extension"
        case scriptProcessor = "scriptProcessor"
        case arguments = "arguments"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(._extension) {
        self._extension = try container.decode(String?.self, forKey: ._extension)
    }
    if container.contains(.scriptProcessor) {
        self.scriptProcessor = try container.decode(String?.self, forKey: .scriptProcessor)
    }
    if container.contains(.arguments) {
        self.arguments = try container.decode(String?.self, forKey: .arguments)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self._extension != nil {try container.encode(self._extension, forKey: ._extension)}
    if self.scriptProcessor != nil {try container.encode(self.scriptProcessor, forKey: .scriptProcessor)}
    if self.arguments != nil {try container.encode(self.arguments, forKey: .arguments)}
  }
}

extension DataFactory {
  public static func createHandlerMappingProtocol() -> HandlerMappingProtocol {
    return HandlerMappingData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostingEnvironmentDeploymentInfoData : HostingEnvironmentDeploymentInfoProtocol {
    public var name: String?
    public var location: String?

        enum CodingKeys: String, CodingKey {case name = "name"
        case location = "location"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.location) {
        self.location = try container.decode(String?.self, forKey: .location)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.location != nil {try container.encode(self.location, forKey: .location)}
  }
}

extension DataFactory {
  public static func createHostingEnvironmentDeploymentInfoProtocol() -> HostingEnvironmentDeploymentInfoProtocol {
    return HostingEnvironmentDeploymentInfoData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostingEnvironmentDiagnosticsData : HostingEnvironmentDiagnosticsProtocol {
    public var name: String?
    public var diagnosicsOutput: String?

        enum CodingKeys: String, CodingKey {case name = "name"
        case diagnosicsOutput = "diagnosicsOutput"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.diagnosicsOutput) {
        self.diagnosicsOutput = try container.decode(String?.self, forKey: .diagnosicsOutput)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.diagnosicsOutput != nil {try container.encode(self.diagnosicsOutput, forKey: .diagnosicsOutput)}
  }
}

extension DataFactory {
  public static func createHostingEnvironmentDiagnosticsProtocol() -> HostingEnvironmentDiagnosticsProtocol {
    return HostingEnvironmentDiagnosticsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostingEnvironmentProfileData : HostingEnvironmentProfileProtocol {
    public var id: String?
    public var name: String?
    public var type: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case type = "type"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
  }
}

extension DataFactory {
  public static func createHostingEnvironmentProfileProtocol() -> HostingEnvironmentProfileProtocol {
    return HostingEnvironmentProfileData()
  }
}


// HostingEnvironmentStatus enumerates the values for hosting environment status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum HostingEnvironmentStatusEnum: String, Codable
{
// Deleting specifies the deleting state for hosting environment status.
    case Deleting = "Deleting"
// Preparing specifies the preparing state for hosting environment status.
    case Preparing = "Preparing"
// Ready specifies the ready state for hosting environment status.
    case Ready = "Ready"
// Scaling specifies the scaling state for hosting environment status.
    case Scaling = "Scaling"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostNameBindingCollectionData : HostNameBindingCollectionProtocol {
    public var value: [HostNameBindingProtocol]
    public var _nextLink: String?

        enum CodingKeys: String, CodingKey {case value = "value"
        case _nextLink = "nextLink"
        }

  public init(value: [HostNameBindingProtocol])  {
    self.value = value
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([HostNameBindingData].self, forKey: .value)
    if container.contains(._nextLink) {
        self._nextLink = try container.decode(String?.self, forKey: ._nextLink)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.value as! [HostNameBindingData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createHostNameBindingCollectionProtocol(value: [HostNameBindingProtocol]) -> HostNameBindingCollectionProtocol {
    return HostNameBindingCollectionData(value: value)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostNameBindingData : HostNameBindingProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: HostNameBindingPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(HostNameBindingPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! HostNameBindingPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createHostNameBindingProtocol() -> HostNameBindingProtocol {
    return HostNameBindingData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostNameBindingPropertiesData : HostNameBindingPropertiesProtocol {
    public var siteName: String?
    public var domainId: String?
    public var azureResourceName: String?
    public var azureResourceType: AzureResourceTypeEnum?
    public var customHostNameDnsRecordType: CustomHostNameDnsRecordTypeEnum?
    public var hostNameType: HostNameTypeEnum?
    public var sslState: SslStateEnum?
    public var thumbprint: String?
    public var virtualIP: String?

        enum CodingKeys: String, CodingKey {case siteName = "siteName"
        case domainId = "domainId"
        case azureResourceName = "azureResourceName"
        case azureResourceType = "azureResourceType"
        case customHostNameDnsRecordType = "customHostNameDnsRecordType"
        case hostNameType = "hostNameType"
        case sslState = "sslState"
        case thumbprint = "thumbprint"
        case virtualIP = "virtualIP"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.siteName) {
        self.siteName = try container.decode(String?.self, forKey: .siteName)
    }
    if container.contains(.domainId) {
        self.domainId = try container.decode(String?.self, forKey: .domainId)
    }
    if container.contains(.azureResourceName) {
        self.azureResourceName = try container.decode(String?.self, forKey: .azureResourceName)
    }
    if container.contains(.azureResourceType) {
        self.azureResourceType = try container.decode(AzureResourceTypeEnum?.self, forKey: .azureResourceType)
    }
    if container.contains(.customHostNameDnsRecordType) {
        self.customHostNameDnsRecordType = try container.decode(CustomHostNameDnsRecordTypeEnum?.self, forKey: .customHostNameDnsRecordType)
    }
    if container.contains(.hostNameType) {
        self.hostNameType = try container.decode(HostNameTypeEnum?.self, forKey: .hostNameType)
    }
    if container.contains(.sslState) {
        self.sslState = try container.decode(SslStateEnum?.self, forKey: .sslState)
    }
    if container.contains(.thumbprint) {
        self.thumbprint = try container.decode(String?.self, forKey: .thumbprint)
    }
    if container.contains(.virtualIP) {
        self.virtualIP = try container.decode(String?.self, forKey: .virtualIP)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.siteName != nil {try container.encode(self.siteName, forKey: .siteName)}
    if self.domainId != nil {try container.encode(self.domainId, forKey: .domainId)}
    if self.azureResourceName != nil {try container.encode(self.azureResourceName, forKey: .azureResourceName)}
    if self.azureResourceType != nil {try container.encode(self.azureResourceType, forKey: .azureResourceType)}
    if self.customHostNameDnsRecordType != nil {try container.encode(self.customHostNameDnsRecordType, forKey: .customHostNameDnsRecordType)}
    if self.hostNameType != nil {try container.encode(self.hostNameType, forKey: .hostNameType)}
    if self.sslState != nil {try container.encode(self.sslState, forKey: .sslState)}
    if self.thumbprint != nil {try container.encode(self.thumbprint, forKey: .thumbprint)}
    if self.virtualIP != nil {try container.encode(self.virtualIP, forKey: .virtualIP)}
  }
}

extension DataFactory {
  public static func createHostNameBindingPropertiesProtocol() -> HostNameBindingPropertiesProtocol {
    return HostNameBindingPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostNameData : HostNameProtocol {
    public var name: String?
    public var siteNames: [String]?
    public var azureResourceName: String?
    public var azureResourceType: AzureResourceTypeEnum?
    public var customHostNameDnsRecordType: CustomHostNameDnsRecordTypeEnum?
    public var hostNameType: HostNameTypeEnum?

        enum CodingKeys: String, CodingKey {case name = "name"
        case siteNames = "siteNames"
        case azureResourceName = "azureResourceName"
        case azureResourceType = "azureResourceType"
        case customHostNameDnsRecordType = "customHostNameDnsRecordType"
        case hostNameType = "hostNameType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.siteNames) {
        self.siteNames = try container.decode([String]?.self, forKey: .siteNames)
    }
    if container.contains(.azureResourceName) {
        self.azureResourceName = try container.decode(String?.self, forKey: .azureResourceName)
    }
    if container.contains(.azureResourceType) {
        self.azureResourceType = try container.decode(AzureResourceTypeEnum?.self, forKey: .azureResourceType)
    }
    if container.contains(.customHostNameDnsRecordType) {
        self.customHostNameDnsRecordType = try container.decode(CustomHostNameDnsRecordTypeEnum?.self, forKey: .customHostNameDnsRecordType)
    }
    if container.contains(.hostNameType) {
        self.hostNameType = try container.decode(HostNameTypeEnum?.self, forKey: .hostNameType)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.siteNames != nil {try container.encode(self.siteNames as! [String]?, forKey: .siteNames)}
    if self.azureResourceName != nil {try container.encode(self.azureResourceName, forKey: .azureResourceName)}
    if self.azureResourceType != nil {try container.encode(self.azureResourceType, forKey: .azureResourceType)}
    if self.customHostNameDnsRecordType != nil {try container.encode(self.customHostNameDnsRecordType, forKey: .customHostNameDnsRecordType)}
    if self.hostNameType != nil {try container.encode(self.hostNameType, forKey: .hostNameType)}
  }
}

extension DataFactory {
  public static func createHostNameProtocol() -> HostNameProtocol {
    return HostNameData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HostNameSslStateData : HostNameSslStateProtocol {
    public var name: String?
    public var sslState: SslStateEnum?
    public var virtualIP: String?
    public var thumbprint: String?
    public var toUpdate: Bool?
    public var hostType: HostTypeEnum?

        enum CodingKeys: String, CodingKey {case name = "name"
        case sslState = "sslState"
        case virtualIP = "virtualIP"
        case thumbprint = "thumbprint"
        case toUpdate = "toUpdate"
        case hostType = "hostType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.sslState) {
        self.sslState = try container.decode(SslStateEnum?.self, forKey: .sslState)
    }
    if container.contains(.virtualIP) {
        self.virtualIP = try container.decode(String?.self, forKey: .virtualIP)
    }
    if container.contains(.thumbprint) {
        self.thumbprint = try container.decode(String?.self, forKey: .thumbprint)
    }
    if container.contains(.toUpdate) {
        self.toUpdate = try container.decode(Bool?.self, forKey: .toUpdate)
    }
    if container.contains(.hostType) {
        self.hostType = try container.decode(HostTypeEnum?.self, forKey: .hostType)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.sslState != nil {try container.encode(self.sslState, forKey: .sslState)}
    if self.virtualIP != nil {try container.encode(self.virtualIP, forKey: .virtualIP)}
    if self.thumbprint != nil {try container.encode(self.thumbprint, forKey: .thumbprint)}
    if self.toUpdate != nil {try container.encode(self.toUpdate, forKey: .toUpdate)}
    if self.hostType != nil {try container.encode(self.hostType, forKey: .hostType)}
  }
}

extension DataFactory {
  public static func createHostNameSslStateProtocol() -> HostNameSslStateProtocol {
    return HostNameSslStateData()
  }
}


// HostNameType enumerates the values for host name type.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum HostNameTypeEnum: String, Codable
{
// Managed specifies the managed state for host name type.
    case Managed = "Managed"
// Verified specifies the verified state for host name type.
    case Verified = "Verified"
}


// HostType enumerates the values for host type.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum HostTypeEnum: String, Codable
{
// HostTypeRepository specifies the host type repository state for host type.
    case HostTypeRepository = "Repository"
// HostTypeStandard specifies the host type standard state for host type.
    case HostTypeStandard = "Standard"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HttpLogsConfigData : HttpLogsConfigProtocol {
    public var fileSystem: FileSystemHttpLogsConfigProtocol?
    public var azureBlobStorage: AzureBlobStorageHttpLogsConfigProtocol?

        enum CodingKeys: String, CodingKey {case fileSystem = "fileSystem"
        case azureBlobStorage = "azureBlobStorage"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.fileSystem) {
        self.fileSystem = try container.decode(FileSystemHttpLogsConfigData?.self, forKey: .fileSystem)
    }
    if container.contains(.azureBlobStorage) {
        self.azureBlobStorage = try container.decode(AzureBlobStorageHttpLogsConfigData?.self, forKey: .azureBlobStorage)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.fileSystem != nil {try container.encode(self.fileSystem as! FileSystemHttpLogsConfigData?, forKey: .fileSystem)}
    if self.azureBlobStorage != nil {try container.encode(self.azureBlobStorage as! AzureBlobStorageHttpLogsConfigData?, forKey: .azureBlobStorage)}
  }
}

extension DataFactory {
  public static func createHttpLogsConfigProtocol() -> HttpLogsConfigProtocol {
    return HttpLogsConfigData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HybridConnectionCollectionData : HybridConnectionCollectionProtocol {
    public var value: [HybridConnectionProtocol]
    public var _nextLink: String?

        enum CodingKeys: String, CodingKey {case value = "value"
        case _nextLink = "nextLink"
        }

  public init(value: [HybridConnectionProtocol])  {
    self.value = value
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([HybridConnectionData].self, forKey: .value)
    if container.contains(._nextLink) {
        self._nextLink = try container.decode(String?.self, forKey: ._nextLink)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.value as! [HybridConnectionData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createHybridConnectionCollectionProtocol(value: [HybridConnectionProtocol]) -> HybridConnectionCollectionProtocol {
    return HybridConnectionCollectionData(value: value)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HybridConnectionData : HybridConnectionProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: HybridConnectionPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(HybridConnectionPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! HybridConnectionPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createHybridConnectionProtocol() -> HybridConnectionProtocol {
    return HybridConnectionData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HybridConnectionKeyData : HybridConnectionKeyProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: HybridConnectionKeyPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(HybridConnectionKeyPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! HybridConnectionKeyPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createHybridConnectionKeyProtocol() -> HybridConnectionKeyProtocol {
    return HybridConnectionKeyData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HybridConnectionKeyPropertiesData : HybridConnectionKeyPropertiesProtocol {
    public var sendKeyName: String?
    public var sendKeyValue: String?

        enum CodingKeys: String, CodingKey {case sendKeyName = "sendKeyName"
        case sendKeyValue = "sendKeyValue"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.sendKeyName) {
        self.sendKeyName = try container.decode(String?.self, forKey: .sendKeyName)
    }
    if container.contains(.sendKeyValue) {
        self.sendKeyValue = try container.decode(String?.self, forKey: .sendKeyValue)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.sendKeyName != nil {try container.encode(self.sendKeyName, forKey: .sendKeyName)}
    if self.sendKeyValue != nil {try container.encode(self.sendKeyValue, forKey: .sendKeyValue)}
  }
}

extension DataFactory {
  public static func createHybridConnectionKeyPropertiesProtocol() -> HybridConnectionKeyPropertiesProtocol {
    return HybridConnectionKeyPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HybridConnectionLimitsData : HybridConnectionLimitsProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: HybridConnectionLimitsPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(HybridConnectionLimitsPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! HybridConnectionLimitsPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createHybridConnectionLimitsProtocol() -> HybridConnectionLimitsProtocol {
    return HybridConnectionLimitsData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HybridConnectionLimitsPropertiesData : HybridConnectionLimitsPropertiesProtocol {
    public var current: Int32?
    public var maximum: Int32?

        enum CodingKeys: String, CodingKey {case current = "current"
        case maximum = "maximum"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.current) {
        self.current = try container.decode(Int32?.self, forKey: .current)
    }
    if container.contains(.maximum) {
        self.maximum = try container.decode(Int32?.self, forKey: .maximum)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.current != nil {try container.encode(self.current, forKey: .current)}
    if self.maximum != nil {try container.encode(self.maximum, forKey: .maximum)}
  }
}

extension DataFactory {
  public static func createHybridConnectionLimitsPropertiesProtocol() -> HybridConnectionLimitsPropertiesProtocol {
    return HybridConnectionLimitsPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct HybridConnectionPropertiesData : HybridConnectionPropertiesProtocol {
    public var serviceBusNamespace: String?
    public var relayName: String?
    public var relayArmUri: String?
    public var hostname: String?
    public var port: Int32?
    public var sendKeyName: String?
    public var sendKeyValue: String?
    public var serviceBusSuffix: String?

        enum CodingKeys: String, CodingKey {case serviceBusNamespace = "serviceBusNamespace"
        case relayName = "relayName"
        case relayArmUri = "relayArmUri"
        case hostname = "hostname"
        case port = "port"
        case sendKeyName = "sendKeyName"
        case sendKeyValue = "sendKeyValue"
        case serviceBusSuffix = "serviceBusSuffix"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.serviceBusNamespace) {
        self.serviceBusNamespace = try container.decode(String?.self, forKey: .serviceBusNamespace)
    }
    if container.contains(.relayName) {
        self.relayName = try container.decode(String?.self, forKey: .relayName)
    }
    if container.contains(.relayArmUri) {
        self.relayArmUri = try container.decode(String?.self, forKey: .relayArmUri)
    }
    if container.contains(.hostname) {
        self.hostname = try container.decode(String?.self, forKey: .hostname)
    }
    if container.contains(.port) {
        self.port = try container.decode(Int32?.self, forKey: .port)
    }
    if container.contains(.sendKeyName) {
        self.sendKeyName = try container.decode(String?.self, forKey: .sendKeyName)
    }
    if container.contains(.sendKeyValue) {
        self.sendKeyValue = try container.decode(String?.self, forKey: .sendKeyValue)
    }
    if container.contains(.serviceBusSuffix) {
        self.serviceBusSuffix = try container.decode(String?.self, forKey: .serviceBusSuffix)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.serviceBusNamespace != nil {try container.encode(self.serviceBusNamespace, forKey: .serviceBusNamespace)}
    if self.relayName != nil {try container.encode(self.relayName, forKey: .relayName)}
    if self.relayArmUri != nil {try container.encode(self.relayArmUri, forKey: .relayArmUri)}
    if self.hostname != nil {try container.encode(self.hostname, forKey: .hostname)}
    if self.port != nil {try container.encode(self.port, forKey: .port)}
    if self.sendKeyName != nil {try container.encode(self.sendKeyName, forKey: .sendKeyName)}
    if self.sendKeyValue != nil {try container.encode(self.sendKeyValue, forKey: .sendKeyValue)}
    if self.serviceBusSuffix != nil {try container.encode(self.serviceBusSuffix, forKey: .serviceBusSuffix)}
  }
}

extension DataFactory {
  public static func createHybridConnectionPropertiesProtocol() -> HybridConnectionPropertiesProtocol {
    return HybridConnectionPropertiesData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct IdentifierCollectionData : IdentifierCollectionProtocol {
    public var value: [IdentifierProtocol]
    public var _nextLink: String?

        enum CodingKeys: String, CodingKey {case value = "value"
        case _nextLink = "nextLink"
        }

  public init(value: [IdentifierProtocol])  {
    self.value = value
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([IdentifierData].self, forKey: .value)
    if container.contains(._nextLink) {
        self._nextLink = try container.decode(String?.self, forKey: ._nextLink)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.value as! [IdentifierData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createIdentifierCollectionProtocol(value: [IdentifierProtocol]) -> IdentifierCollectionProtocol {
    return IdentifierCollectionData(value: value)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct IdentifierData : IdentifierProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: IdentifierPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case kind = "kind"
        case type = "type"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.kind) {
        self.kind = try container.decode(String?.self, forKey: .kind)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(IdentifierPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.kind != nil {try container.encode(self.kind, forKey: .kind)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! IdentifierPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createIdentifierProtocol() -> IdentifierProtocol {
    return IdentifierData()
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct IdentifierPropertiesData : IdentifierPropertiesProtocol {
    public var id: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
  }
}

extension DataFactory {
  public static func createIdentifierPropertiesProtocol() -> IdentifierPropertiesProtocol {
    return IdentifierPropertiesData()
  }
}


// InAvailabilityReasonType enumerates the values for in availability reason type.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum InAvailabilityReasonTypeEnum: String, Codable
{
// AlreadyExists specifies the already exists state for in availability reason type.
    case AlreadyExists = "AlreadyExists"
// Invalid specifies the invalid state for in availability reason type.
    case Invalid = "Invalid"
}


// InternalLoadBalancingMode enumerates the values for internal load balancing mode.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum InternalLoadBalancingModeEnum: String, Codable
{
// InternalLoadBalancingModeNone specifies the internal load balancing mode none state for internal load balancing
// mode.
    case InternalLoadBalancingModeNone = "None"
// InternalLoadBalancingModePublishing specifies the internal load balancing mode publishing state for internal load
// balancing mode.
    case InternalLoadBalancingModePublishing = "Publishing"
// InternalLoadBalancingModeWeb specifies the internal load balancing mode web state for internal load balancing mode.
    case InternalLoadBalancingModeWeb = "Web"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct IpSecurityRestrictionData : IpSecurityRestrictionProtocol {
    public var ipAddress: String
    public var subnetMask: String?

        enum CodingKeys: String, CodingKey {case ipAddress = "ipAddress"
        case subnetMask = "subnetMask"
        }

  public init(ipAddress: String)  {
    self.ipAddress = ipAddress
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.ipAddress = try container.decode(String.self, forKey: .ipAddress)
    if container.contains(.subnetMask) {
        self.subnetMask = try container.decode(String?.self, forKey: .subnetMask)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.ipAddress, forKey: .ipAddress)
    if self.subnetMask != nil {try container.encode(self.subnetMask, forKey: .subnetMask)}
  }
}

extension DataFactory {
  public static func createIpSecurityRestrictionProtocol(ipAddress: String) -> IpSecurityRestrictionProtocol {
    return IpSecurityRestrictionData(ipAddress: ipAddress)
  }
}