// 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 SiteLimitsData : SiteLimitsProtocol {
    public var maxPercentageCpu: Double?
    public var maxMemoryInMb: Int64?
    public var maxDiskSizeInMb: Int64?

        enum CodingKeys: String, CodingKey {case maxPercentageCpu = "maxPercentageCpu"
        case maxMemoryInMb = "maxMemoryInMb"
        case maxDiskSizeInMb = "maxDiskSizeInMb"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.maxPercentageCpu) {
        self.maxPercentageCpu = try container.decode(Double?.self, forKey: .maxPercentageCpu)
    }
    if container.contains(.maxMemoryInMb) {
        self.maxMemoryInMb = try container.decode(Int64?.self, forKey: .maxMemoryInMb)
    }
    if container.contains(.maxDiskSizeInMb) {
        self.maxDiskSizeInMb = try container.decode(Int64?.self, forKey: .maxDiskSizeInMb)
    }
    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.maxPercentageCpu != nil {try container.encode(self.maxPercentageCpu, forKey: .maxPercentageCpu)}
    if self.maxMemoryInMb != nil {try container.encode(self.maxMemoryInMb, forKey: .maxMemoryInMb)}
    if self.maxDiskSizeInMb != nil {try container.encode(self.maxDiskSizeInMb, forKey: .maxDiskSizeInMb)}
  }
}

extension DataFactory {
  public static func createSiteLimitsProtocol() -> SiteLimitsProtocol {
    return SiteLimitsData()
  }
}


// SiteLoadBalancing enumerates the values for site load balancing.

// 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 SiteLoadBalancingEnum: String, Codable
{
// LeastRequests specifies the least requests state for site load balancing.
    case LeastRequests = "LeastRequests"
// LeastResponseTime specifies the least response time state for site load balancing.
    case LeastResponseTime = "LeastResponseTime"
// RequestHash specifies the request hash state for site load balancing.
    case RequestHash = "RequestHash"
// WeightedRoundRobin specifies the weighted round robin state for site load balancing.
    case WeightedRoundRobin = "WeightedRoundRobin"
// WeightedTotalTraffic specifies the weighted total traffic state for site load balancing.
    case WeightedTotalTraffic = "WeightedTotalTraffic"
}


// 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 SiteLogsConfigData : SiteLogsConfigProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SiteLogsConfigPropertiesProtocol?

        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(SiteLogsConfigPropertiesData?.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! SiteLogsConfigPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSiteLogsConfigProtocol() -> SiteLogsConfigProtocol {
    return SiteLogsConfigData()
  }
}


// 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 SiteLogsConfigPropertiesData : SiteLogsConfigPropertiesProtocol {
    public var applicationLogs: ApplicationLogsConfigProtocol?
    public var httpLogs: HttpLogsConfigProtocol?
    public var failedRequestsTracing: EnabledConfigProtocol?
    public var detailedErrorMessages: EnabledConfigProtocol?

        enum CodingKeys: String, CodingKey {case applicationLogs = "applicationLogs"
        case httpLogs = "httpLogs"
        case failedRequestsTracing = "failedRequestsTracing"
        case detailedErrorMessages = "detailedErrorMessages"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.applicationLogs) {
        self.applicationLogs = try container.decode(ApplicationLogsConfigData?.self, forKey: .applicationLogs)
    }
    if container.contains(.httpLogs) {
        self.httpLogs = try container.decode(HttpLogsConfigData?.self, forKey: .httpLogs)
    }
    if container.contains(.failedRequestsTracing) {
        self.failedRequestsTracing = try container.decode(EnabledConfigData?.self, forKey: .failedRequestsTracing)
    }
    if container.contains(.detailedErrorMessages) {
        self.detailedErrorMessages = try container.decode(EnabledConfigData?.self, forKey: .detailedErrorMessages)
    }
    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.applicationLogs != nil {try container.encode(self.applicationLogs as! ApplicationLogsConfigData?, forKey: .applicationLogs)}
    if self.httpLogs != nil {try container.encode(self.httpLogs as! HttpLogsConfigData?, forKey: .httpLogs)}
    if self.failedRequestsTracing != nil {try container.encode(self.failedRequestsTracing as! EnabledConfigData?, forKey: .failedRequestsTracing)}
    if self.detailedErrorMessages != nil {try container.encode(self.detailedErrorMessages as! EnabledConfigData?, forKey: .detailedErrorMessages)}
  }
}

extension DataFactory {
  public static func createSiteLogsConfigPropertiesProtocol() -> SiteLogsConfigPropertiesProtocol {
    return SiteLogsConfigPropertiesData()
  }
}


// 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 SiteMachineKeyData : SiteMachineKeyProtocol {
    public var validation: String?
    public var validationKey: String?
    public var decryption: String?
    public var decryptionKey: String?

        enum CodingKeys: String, CodingKey {case validation = "validation"
        case validationKey = "validationKey"
        case decryption = "decryption"
        case decryptionKey = "decryptionKey"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.validation) {
        self.validation = try container.decode(String?.self, forKey: .validation)
    }
    if container.contains(.validationKey) {
        self.validationKey = try container.decode(String?.self, forKey: .validationKey)
    }
    if container.contains(.decryption) {
        self.decryption = try container.decode(String?.self, forKey: .decryption)
    }
    if container.contains(.decryptionKey) {
        self.decryptionKey = try container.decode(String?.self, forKey: .decryptionKey)
    }
    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.validation != nil {try container.encode(self.validation, forKey: .validation)}
    if self.validationKey != nil {try container.encode(self.validationKey, forKey: .validationKey)}
    if self.decryption != nil {try container.encode(self.decryption, forKey: .decryption)}
    if self.decryptionKey != nil {try container.encode(self.decryptionKey, forKey: .decryptionKey)}
  }
}

extension DataFactory {
  public static func createSiteMachineKeyProtocol() -> SiteMachineKeyProtocol {
    return SiteMachineKeyData()
  }
}


// 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 SitePatchResourceData : SitePatchResourceProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SitePatchResourcePropertiesProtocol?

        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(SitePatchResourcePropertiesData?.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! SitePatchResourcePropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSitePatchResourceProtocol() -> SitePatchResourceProtocol {
    return SitePatchResourceData()
  }
}


// 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 SitePatchResourcePropertiesData : SitePatchResourcePropertiesProtocol {
    public var state: String?
    public var hostNames: [String]?
    public var repositorySiteName: String?
    public var usageState: UsageStateEnum?
    public var enabled: Bool?
    public var enabledHostNames: [String]?
    public var availabilityState: SiteAvailabilityStateEnum?
    public var hostNameSslStates: [HostNameSslStateProtocol?]?
    public var serverFarmId: String?
    public var reserved: Bool?
    public var lastModifiedTimeUtc: Date?
    public var siteConfig: SiteConfigProtocol?
    public var trafficManagerHostNames: [String]?
    public var scmSiteAlsoStopped: Bool?
    public var targetSwapSlot: String?
    public var hostingEnvironmentProfile: HostingEnvironmentProfileProtocol?
    public var clientAffinityEnabled: Bool?
    public var clientCertEnabled: Bool?
    public var hostNamesDisabled: Bool?
    public var outboundIpAddresses: String?
    public var possibleOutboundIpAddresses: String?
    public var containerSize: Int32?
    public var dailyMemoryTimeQuota: Int32?
    public var suspendedTill: Date?
    public var maxNumberOfWorkers: Int32?
    public var cloningInfo: CloningInfoProtocol?
    public var snapshotInfo: SnapshotRecoveryRequestProtocol?
    public var resourceGroup: String?
    public var isDefaultContainer: Bool?
    public var defaultHostName: String?
    public var slotSwapStatus: SlotSwapStatusProtocol?
    public var httpsOnly: Bool?

        enum CodingKeys: String, CodingKey {case state = "state"
        case hostNames = "hostNames"
        case repositorySiteName = "repositorySiteName"
        case usageState = "usageState"
        case enabled = "enabled"
        case enabledHostNames = "enabledHostNames"
        case availabilityState = "availabilityState"
        case hostNameSslStates = "hostNameSslStates"
        case serverFarmId = "serverFarmId"
        case reserved = "reserved"
        case lastModifiedTimeUtc = "lastModifiedTimeUtc"
        case siteConfig = "siteConfig"
        case trafficManagerHostNames = "trafficManagerHostNames"
        case scmSiteAlsoStopped = "scmSiteAlsoStopped"
        case targetSwapSlot = "targetSwapSlot"
        case hostingEnvironmentProfile = "hostingEnvironmentProfile"
        case clientAffinityEnabled = "clientAffinityEnabled"
        case clientCertEnabled = "clientCertEnabled"
        case hostNamesDisabled = "hostNamesDisabled"
        case outboundIpAddresses = "outboundIpAddresses"
        case possibleOutboundIpAddresses = "possibleOutboundIpAddresses"
        case containerSize = "containerSize"
        case dailyMemoryTimeQuota = "dailyMemoryTimeQuota"
        case suspendedTill = "suspendedTill"
        case maxNumberOfWorkers = "maxNumberOfWorkers"
        case cloningInfo = "cloningInfo"
        case snapshotInfo = "snapshotInfo"
        case resourceGroup = "resourceGroup"
        case isDefaultContainer = "isDefaultContainer"
        case defaultHostName = "defaultHostName"
        case slotSwapStatus = "slotSwapStatus"
        case httpsOnly = "httpsOnly"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.state) {
        self.state = try container.decode(String?.self, forKey: .state)
    }
    if container.contains(.hostNames) {
        self.hostNames = try container.decode([String]?.self, forKey: .hostNames)
    }
    if container.contains(.repositorySiteName) {
        self.repositorySiteName = try container.decode(String?.self, forKey: .repositorySiteName)
    }
    if container.contains(.usageState) {
        self.usageState = try container.decode(UsageStateEnum?.self, forKey: .usageState)
    }
    if container.contains(.enabled) {
        self.enabled = try container.decode(Bool?.self, forKey: .enabled)
    }
    if container.contains(.enabledHostNames) {
        self.enabledHostNames = try container.decode([String]?.self, forKey: .enabledHostNames)
    }
    if container.contains(.availabilityState) {
        self.availabilityState = try container.decode(SiteAvailabilityStateEnum?.self, forKey: .availabilityState)
    }
    if container.contains(.hostNameSslStates) {
        self.hostNameSslStates = try container.decode([HostNameSslStateData?]?.self, forKey: .hostNameSslStates)
    }
    if container.contains(.serverFarmId) {
        self.serverFarmId = try container.decode(String?.self, forKey: .serverFarmId)
    }
    if container.contains(.reserved) {
        self.reserved = try container.decode(Bool?.self, forKey: .reserved)
    }
    if container.contains(.lastModifiedTimeUtc) {
        self.lastModifiedTimeUtc = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastModifiedTimeUtc)), format: .dateTime)
    }
    if container.contains(.siteConfig) {
        self.siteConfig = try container.decode(SiteConfigData?.self, forKey: .siteConfig)
    }
    if container.contains(.trafficManagerHostNames) {
        self.trafficManagerHostNames = try container.decode([String]?.self, forKey: .trafficManagerHostNames)
    }
    if container.contains(.scmSiteAlsoStopped) {
        self.scmSiteAlsoStopped = try container.decode(Bool?.self, forKey: .scmSiteAlsoStopped)
    }
    if container.contains(.targetSwapSlot) {
        self.targetSwapSlot = try container.decode(String?.self, forKey: .targetSwapSlot)
    }
    if container.contains(.hostingEnvironmentProfile) {
        self.hostingEnvironmentProfile = try container.decode(HostingEnvironmentProfileData?.self, forKey: .hostingEnvironmentProfile)
    }
    if container.contains(.clientAffinityEnabled) {
        self.clientAffinityEnabled = try container.decode(Bool?.self, forKey: .clientAffinityEnabled)
    }
    if container.contains(.clientCertEnabled) {
        self.clientCertEnabled = try container.decode(Bool?.self, forKey: .clientCertEnabled)
    }
    if container.contains(.hostNamesDisabled) {
        self.hostNamesDisabled = try container.decode(Bool?.self, forKey: .hostNamesDisabled)
    }
    if container.contains(.outboundIpAddresses) {
        self.outboundIpAddresses = try container.decode(String?.self, forKey: .outboundIpAddresses)
    }
    if container.contains(.possibleOutboundIpAddresses) {
        self.possibleOutboundIpAddresses = try container.decode(String?.self, forKey: .possibleOutboundIpAddresses)
    }
    if container.contains(.containerSize) {
        self.containerSize = try container.decode(Int32?.self, forKey: .containerSize)
    }
    if container.contains(.dailyMemoryTimeQuota) {
        self.dailyMemoryTimeQuota = try container.decode(Int32?.self, forKey: .dailyMemoryTimeQuota)
    }
    if container.contains(.suspendedTill) {
        self.suspendedTill = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .suspendedTill)), format: .dateTime)
    }
    if container.contains(.maxNumberOfWorkers) {
        self.maxNumberOfWorkers = try container.decode(Int32?.self, forKey: .maxNumberOfWorkers)
    }
    if container.contains(.cloningInfo) {
        self.cloningInfo = try container.decode(CloningInfoData?.self, forKey: .cloningInfo)
    }
    if container.contains(.snapshotInfo) {
        self.snapshotInfo = try container.decode(SnapshotRecoveryRequestData?.self, forKey: .snapshotInfo)
    }
    if container.contains(.resourceGroup) {
        self.resourceGroup = try container.decode(String?.self, forKey: .resourceGroup)
    }
    if container.contains(.isDefaultContainer) {
        self.isDefaultContainer = try container.decode(Bool?.self, forKey: .isDefaultContainer)
    }
    if container.contains(.defaultHostName) {
        self.defaultHostName = try container.decode(String?.self, forKey: .defaultHostName)
    }
    if container.contains(.slotSwapStatus) {
        self.slotSwapStatus = try container.decode(SlotSwapStatusData?.self, forKey: .slotSwapStatus)
    }
    if container.contains(.httpsOnly) {
        self.httpsOnly = try container.decode(Bool?.self, forKey: .httpsOnly)
    }
    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.state != nil {try container.encode(self.state, forKey: .state)}
    if self.hostNames != nil {try container.encode(self.hostNames as! [String]?, forKey: .hostNames)}
    if self.repositorySiteName != nil {try container.encode(self.repositorySiteName, forKey: .repositorySiteName)}
    if self.usageState != nil {try container.encode(self.usageState, forKey: .usageState)}
    if self.enabled != nil {try container.encode(self.enabled, forKey: .enabled)}
    if self.enabledHostNames != nil {try container.encode(self.enabledHostNames as! [String]?, forKey: .enabledHostNames)}
    if self.availabilityState != nil {try container.encode(self.availabilityState, forKey: .availabilityState)}
    if self.hostNameSslStates != nil {try container.encode(self.hostNameSslStates as! [HostNameSslStateData?]?, forKey: .hostNameSslStates)}
    if self.serverFarmId != nil {try container.encode(self.serverFarmId, forKey: .serverFarmId)}
    if self.reserved != nil {try container.encode(self.reserved, forKey: .reserved)}
    if self.lastModifiedTimeUtc != nil {
        try container.encode(DateConverter.toString(date: self.lastModifiedTimeUtc!, format: .dateTime), forKey: .lastModifiedTimeUtc)
    }
    if self.siteConfig != nil {try container.encode(self.siteConfig as! SiteConfigData?, forKey: .siteConfig)}
    if self.trafficManagerHostNames != nil {try container.encode(self.trafficManagerHostNames as! [String]?, forKey: .trafficManagerHostNames)}
    if self.scmSiteAlsoStopped != nil {try container.encode(self.scmSiteAlsoStopped, forKey: .scmSiteAlsoStopped)}
    if self.targetSwapSlot != nil {try container.encode(self.targetSwapSlot, forKey: .targetSwapSlot)}
    if self.hostingEnvironmentProfile != nil {try container.encode(self.hostingEnvironmentProfile as! HostingEnvironmentProfileData?, forKey: .hostingEnvironmentProfile)}
    if self.clientAffinityEnabled != nil {try container.encode(self.clientAffinityEnabled, forKey: .clientAffinityEnabled)}
    if self.clientCertEnabled != nil {try container.encode(self.clientCertEnabled, forKey: .clientCertEnabled)}
    if self.hostNamesDisabled != nil {try container.encode(self.hostNamesDisabled, forKey: .hostNamesDisabled)}
    if self.outboundIpAddresses != nil {try container.encode(self.outboundIpAddresses, forKey: .outboundIpAddresses)}
    if self.possibleOutboundIpAddresses != nil {try container.encode(self.possibleOutboundIpAddresses, forKey: .possibleOutboundIpAddresses)}
    if self.containerSize != nil {try container.encode(self.containerSize, forKey: .containerSize)}
    if self.dailyMemoryTimeQuota != nil {try container.encode(self.dailyMemoryTimeQuota, forKey: .dailyMemoryTimeQuota)}
    if self.suspendedTill != nil {
        try container.encode(DateConverter.toString(date: self.suspendedTill!, format: .dateTime), forKey: .suspendedTill)
    }
    if self.maxNumberOfWorkers != nil {try container.encode(self.maxNumberOfWorkers, forKey: .maxNumberOfWorkers)}
    if self.cloningInfo != nil {try container.encode(self.cloningInfo as! CloningInfoData?, forKey: .cloningInfo)}
    if self.snapshotInfo != nil {try container.encode(self.snapshotInfo as! SnapshotRecoveryRequestData?, forKey: .snapshotInfo)}
    if self.resourceGroup != nil {try container.encode(self.resourceGroup, forKey: .resourceGroup)}
    if self.isDefaultContainer != nil {try container.encode(self.isDefaultContainer, forKey: .isDefaultContainer)}
    if self.defaultHostName != nil {try container.encode(self.defaultHostName, forKey: .defaultHostName)}
    if self.slotSwapStatus != nil {try container.encode(self.slotSwapStatus as! SlotSwapStatusData?, forKey: .slotSwapStatus)}
    if self.httpsOnly != nil {try container.encode(self.httpsOnly, forKey: .httpsOnly)}
  }
}

extension DataFactory {
  public static func createSitePatchResourcePropertiesProtocol() -> SitePatchResourcePropertiesProtocol {
    return SitePatchResourcePropertiesData()
  }
}


// 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 SitePhpErrorLogFlagData : SitePhpErrorLogFlagProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SitePhpErrorLogFlagPropertiesProtocol?

        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(SitePhpErrorLogFlagPropertiesData?.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! SitePhpErrorLogFlagPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSitePhpErrorLogFlagProtocol() -> SitePhpErrorLogFlagProtocol {
    return SitePhpErrorLogFlagData()
  }
}


// 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 SitePhpErrorLogFlagPropertiesData : SitePhpErrorLogFlagPropertiesProtocol {
    public var localLogErrors: String?
    public var masterLogErrors: String?
    public var localLogErrorsMaxLength: String?
    public var masterLogErrorsMaxLength: String?

        enum CodingKeys: String, CodingKey {case localLogErrors = "localLogErrors"
        case masterLogErrors = "masterLogErrors"
        case localLogErrorsMaxLength = "localLogErrorsMaxLength"
        case masterLogErrorsMaxLength = "masterLogErrorsMaxLength"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.localLogErrors) {
        self.localLogErrors = try container.decode(String?.self, forKey: .localLogErrors)
    }
    if container.contains(.masterLogErrors) {
        self.masterLogErrors = try container.decode(String?.self, forKey: .masterLogErrors)
    }
    if container.contains(.localLogErrorsMaxLength) {
        self.localLogErrorsMaxLength = try container.decode(String?.self, forKey: .localLogErrorsMaxLength)
    }
    if container.contains(.masterLogErrorsMaxLength) {
        self.masterLogErrorsMaxLength = try container.decode(String?.self, forKey: .masterLogErrorsMaxLength)
    }
    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.localLogErrors != nil {try container.encode(self.localLogErrors, forKey: .localLogErrors)}
    if self.masterLogErrors != nil {try container.encode(self.masterLogErrors, forKey: .masterLogErrors)}
    if self.localLogErrorsMaxLength != nil {try container.encode(self.localLogErrorsMaxLength, forKey: .localLogErrorsMaxLength)}
    if self.masterLogErrorsMaxLength != nil {try container.encode(self.masterLogErrorsMaxLength, forKey: .masterLogErrorsMaxLength)}
  }
}

extension DataFactory {
  public static func createSitePhpErrorLogFlagPropertiesProtocol() -> SitePhpErrorLogFlagPropertiesProtocol {
    return SitePhpErrorLogFlagPropertiesData()
  }
}


// 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 SitePropertiesData : SitePropertiesProtocol {
    public var state: String?
    public var hostNames: [String]?
    public var repositorySiteName: String?
    public var usageState: UsageStateEnum?
    public var enabled: Bool?
    public var enabledHostNames: [String]?
    public var availabilityState: SiteAvailabilityStateEnum?
    public var hostNameSslStates: [HostNameSslStateProtocol?]?
    public var serverFarmId: String?
    public var reserved: Bool?
    public var lastModifiedTimeUtc: Date?
    public var siteConfig: SiteConfigProtocol?
    public var trafficManagerHostNames: [String]?
    public var scmSiteAlsoStopped: Bool?
    public var targetSwapSlot: String?
    public var hostingEnvironmentProfile: HostingEnvironmentProfileProtocol?
    public var clientAffinityEnabled: Bool?
    public var clientCertEnabled: Bool?
    public var hostNamesDisabled: Bool?
    public var outboundIpAddresses: String?
    public var possibleOutboundIpAddresses: String?
    public var containerSize: Int32?
    public var dailyMemoryTimeQuota: Int32?
    public var suspendedTill: Date?
    public var maxNumberOfWorkers: Int32?
    public var cloningInfo: CloningInfoProtocol?
    public var snapshotInfo: SnapshotRecoveryRequestProtocol?
    public var resourceGroup: String?
    public var isDefaultContainer: Bool?
    public var defaultHostName: String?
    public var slotSwapStatus: SlotSwapStatusProtocol?
    public var httpsOnly: Bool?

        enum CodingKeys: String, CodingKey {case state = "state"
        case hostNames = "hostNames"
        case repositorySiteName = "repositorySiteName"
        case usageState = "usageState"
        case enabled = "enabled"
        case enabledHostNames = "enabledHostNames"
        case availabilityState = "availabilityState"
        case hostNameSslStates = "hostNameSslStates"
        case serverFarmId = "serverFarmId"
        case reserved = "reserved"
        case lastModifiedTimeUtc = "lastModifiedTimeUtc"
        case siteConfig = "siteConfig"
        case trafficManagerHostNames = "trafficManagerHostNames"
        case scmSiteAlsoStopped = "scmSiteAlsoStopped"
        case targetSwapSlot = "targetSwapSlot"
        case hostingEnvironmentProfile = "hostingEnvironmentProfile"
        case clientAffinityEnabled = "clientAffinityEnabled"
        case clientCertEnabled = "clientCertEnabled"
        case hostNamesDisabled = "hostNamesDisabled"
        case outboundIpAddresses = "outboundIpAddresses"
        case possibleOutboundIpAddresses = "possibleOutboundIpAddresses"
        case containerSize = "containerSize"
        case dailyMemoryTimeQuota = "dailyMemoryTimeQuota"
        case suspendedTill = "suspendedTill"
        case maxNumberOfWorkers = "maxNumberOfWorkers"
        case cloningInfo = "cloningInfo"
        case snapshotInfo = "snapshotInfo"
        case resourceGroup = "resourceGroup"
        case isDefaultContainer = "isDefaultContainer"
        case defaultHostName = "defaultHostName"
        case slotSwapStatus = "slotSwapStatus"
        case httpsOnly = "httpsOnly"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.state) {
        self.state = try container.decode(String?.self, forKey: .state)
    }
    if container.contains(.hostNames) {
        self.hostNames = try container.decode([String]?.self, forKey: .hostNames)
    }
    if container.contains(.repositorySiteName) {
        self.repositorySiteName = try container.decode(String?.self, forKey: .repositorySiteName)
    }
    if container.contains(.usageState) {
        self.usageState = try container.decode(UsageStateEnum?.self, forKey: .usageState)
    }
    if container.contains(.enabled) {
        self.enabled = try container.decode(Bool?.self, forKey: .enabled)
    }
    if container.contains(.enabledHostNames) {
        self.enabledHostNames = try container.decode([String]?.self, forKey: .enabledHostNames)
    }
    if container.contains(.availabilityState) {
        self.availabilityState = try container.decode(SiteAvailabilityStateEnum?.self, forKey: .availabilityState)
    }
    if container.contains(.hostNameSslStates) {
        self.hostNameSslStates = try container.decode([HostNameSslStateData?]?.self, forKey: .hostNameSslStates)
    }
    if container.contains(.serverFarmId) {
        self.serverFarmId = try container.decode(String?.self, forKey: .serverFarmId)
    }
    if container.contains(.reserved) {
        self.reserved = try container.decode(Bool?.self, forKey: .reserved)
    }
    if container.contains(.lastModifiedTimeUtc) {
        self.lastModifiedTimeUtc = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastModifiedTimeUtc)), format: .dateTime)
    }
    if container.contains(.siteConfig) {
        self.siteConfig = try container.decode(SiteConfigData?.self, forKey: .siteConfig)
    }
    if container.contains(.trafficManagerHostNames) {
        self.trafficManagerHostNames = try container.decode([String]?.self, forKey: .trafficManagerHostNames)
    }
    if container.contains(.scmSiteAlsoStopped) {
        self.scmSiteAlsoStopped = try container.decode(Bool?.self, forKey: .scmSiteAlsoStopped)
    }
    if container.contains(.targetSwapSlot) {
        self.targetSwapSlot = try container.decode(String?.self, forKey: .targetSwapSlot)
    }
    if container.contains(.hostingEnvironmentProfile) {
        self.hostingEnvironmentProfile = try container.decode(HostingEnvironmentProfileData?.self, forKey: .hostingEnvironmentProfile)
    }
    if container.contains(.clientAffinityEnabled) {
        self.clientAffinityEnabled = try container.decode(Bool?.self, forKey: .clientAffinityEnabled)
    }
    if container.contains(.clientCertEnabled) {
        self.clientCertEnabled = try container.decode(Bool?.self, forKey: .clientCertEnabled)
    }
    if container.contains(.hostNamesDisabled) {
        self.hostNamesDisabled = try container.decode(Bool?.self, forKey: .hostNamesDisabled)
    }
    if container.contains(.outboundIpAddresses) {
        self.outboundIpAddresses = try container.decode(String?.self, forKey: .outboundIpAddresses)
    }
    if container.contains(.possibleOutboundIpAddresses) {
        self.possibleOutboundIpAddresses = try container.decode(String?.self, forKey: .possibleOutboundIpAddresses)
    }
    if container.contains(.containerSize) {
        self.containerSize = try container.decode(Int32?.self, forKey: .containerSize)
    }
    if container.contains(.dailyMemoryTimeQuota) {
        self.dailyMemoryTimeQuota = try container.decode(Int32?.self, forKey: .dailyMemoryTimeQuota)
    }
    if container.contains(.suspendedTill) {
        self.suspendedTill = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .suspendedTill)), format: .dateTime)
    }
    if container.contains(.maxNumberOfWorkers) {
        self.maxNumberOfWorkers = try container.decode(Int32?.self, forKey: .maxNumberOfWorkers)
    }
    if container.contains(.cloningInfo) {
        self.cloningInfo = try container.decode(CloningInfoData?.self, forKey: .cloningInfo)
    }
    if container.contains(.snapshotInfo) {
        self.snapshotInfo = try container.decode(SnapshotRecoveryRequestData?.self, forKey: .snapshotInfo)
    }
    if container.contains(.resourceGroup) {
        self.resourceGroup = try container.decode(String?.self, forKey: .resourceGroup)
    }
    if container.contains(.isDefaultContainer) {
        self.isDefaultContainer = try container.decode(Bool?.self, forKey: .isDefaultContainer)
    }
    if container.contains(.defaultHostName) {
        self.defaultHostName = try container.decode(String?.self, forKey: .defaultHostName)
    }
    if container.contains(.slotSwapStatus) {
        self.slotSwapStatus = try container.decode(SlotSwapStatusData?.self, forKey: .slotSwapStatus)
    }
    if container.contains(.httpsOnly) {
        self.httpsOnly = try container.decode(Bool?.self, forKey: .httpsOnly)
    }
    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.state != nil {try container.encode(self.state, forKey: .state)}
    if self.hostNames != nil {try container.encode(self.hostNames as! [String]?, forKey: .hostNames)}
    if self.repositorySiteName != nil {try container.encode(self.repositorySiteName, forKey: .repositorySiteName)}
    if self.usageState != nil {try container.encode(self.usageState, forKey: .usageState)}
    if self.enabled != nil {try container.encode(self.enabled, forKey: .enabled)}
    if self.enabledHostNames != nil {try container.encode(self.enabledHostNames as! [String]?, forKey: .enabledHostNames)}
    if self.availabilityState != nil {try container.encode(self.availabilityState, forKey: .availabilityState)}
    if self.hostNameSslStates != nil {try container.encode(self.hostNameSslStates as! [HostNameSslStateData?]?, forKey: .hostNameSslStates)}
    if self.serverFarmId != nil {try container.encode(self.serverFarmId, forKey: .serverFarmId)}
    if self.reserved != nil {try container.encode(self.reserved, forKey: .reserved)}
    if self.lastModifiedTimeUtc != nil {
        try container.encode(DateConverter.toString(date: self.lastModifiedTimeUtc!, format: .dateTime), forKey: .lastModifiedTimeUtc)
    }
    if self.siteConfig != nil {try container.encode(self.siteConfig as! SiteConfigData?, forKey: .siteConfig)}
    if self.trafficManagerHostNames != nil {try container.encode(self.trafficManagerHostNames as! [String]?, forKey: .trafficManagerHostNames)}
    if self.scmSiteAlsoStopped != nil {try container.encode(self.scmSiteAlsoStopped, forKey: .scmSiteAlsoStopped)}
    if self.targetSwapSlot != nil {try container.encode(self.targetSwapSlot, forKey: .targetSwapSlot)}
    if self.hostingEnvironmentProfile != nil {try container.encode(self.hostingEnvironmentProfile as! HostingEnvironmentProfileData?, forKey: .hostingEnvironmentProfile)}
    if self.clientAffinityEnabled != nil {try container.encode(self.clientAffinityEnabled, forKey: .clientAffinityEnabled)}
    if self.clientCertEnabled != nil {try container.encode(self.clientCertEnabled, forKey: .clientCertEnabled)}
    if self.hostNamesDisabled != nil {try container.encode(self.hostNamesDisabled, forKey: .hostNamesDisabled)}
    if self.outboundIpAddresses != nil {try container.encode(self.outboundIpAddresses, forKey: .outboundIpAddresses)}
    if self.possibleOutboundIpAddresses != nil {try container.encode(self.possibleOutboundIpAddresses, forKey: .possibleOutboundIpAddresses)}
    if self.containerSize != nil {try container.encode(self.containerSize, forKey: .containerSize)}
    if self.dailyMemoryTimeQuota != nil {try container.encode(self.dailyMemoryTimeQuota, forKey: .dailyMemoryTimeQuota)}
    if self.suspendedTill != nil {
        try container.encode(DateConverter.toString(date: self.suspendedTill!, format: .dateTime), forKey: .suspendedTill)
    }
    if self.maxNumberOfWorkers != nil {try container.encode(self.maxNumberOfWorkers, forKey: .maxNumberOfWorkers)}
    if self.cloningInfo != nil {try container.encode(self.cloningInfo as! CloningInfoData?, forKey: .cloningInfo)}
    if self.snapshotInfo != nil {try container.encode(self.snapshotInfo as! SnapshotRecoveryRequestData?, forKey: .snapshotInfo)}
    if self.resourceGroup != nil {try container.encode(self.resourceGroup, forKey: .resourceGroup)}
    if self.isDefaultContainer != nil {try container.encode(self.isDefaultContainer, forKey: .isDefaultContainer)}
    if self.defaultHostName != nil {try container.encode(self.defaultHostName, forKey: .defaultHostName)}
    if self.slotSwapStatus != nil {try container.encode(self.slotSwapStatus as! SlotSwapStatusData?, forKey: .slotSwapStatus)}
    if self.httpsOnly != nil {try container.encode(self.httpsOnly, forKey: .httpsOnly)}
  }
}

extension DataFactory {
  public static func createSitePropertiesProtocol() -> SitePropertiesProtocol {
    return SitePropertiesData()
  }
}


// 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 SiteSealData : SiteSealProtocol {
    public var html: String

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

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

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.html = try container.decode(String.self, forKey: .html)
    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.html, forKey: .html)
  }
}

extension DataFactory {
  public static func createSiteSealProtocol(html: String) -> SiteSealProtocol {
    return SiteSealData(html: html)
  }
}


// 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 SiteSealRequestData : SiteSealRequestProtocol {
    public var lightTheme: Bool?
    public var locale: String?

        enum CodingKeys: String, CodingKey {case lightTheme = "lightTheme"
        case locale = "locale"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.lightTheme) {
        self.lightTheme = try container.decode(Bool?.self, forKey: .lightTheme)
    }
    if container.contains(.locale) {
        self.locale = try container.decode(String?.self, forKey: .locale)
    }
    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.lightTheme != nil {try container.encode(self.lightTheme, forKey: .lightTheme)}
    if self.locale != nil {try container.encode(self.locale, forKey: .locale)}
  }
}

extension DataFactory {
  public static func createSiteSealRequestProtocol() -> SiteSealRequestProtocol {
    return SiteSealRequestData()
  }
}


// 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 SiteSourceControlData : SiteSourceControlProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SiteSourceControlPropertiesProtocol?

        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(SiteSourceControlPropertiesData?.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! SiteSourceControlPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSiteSourceControlProtocol() -> SiteSourceControlProtocol {
    return SiteSourceControlData()
  }
}


// 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 SiteSourceControlPropertiesData : SiteSourceControlPropertiesProtocol {
    public var repoUrl: String?
    public var branch: String?
    public var isManualIntegration: Bool?
    public var deploymentRollbackEnabled: Bool?
    public var isMercurial: Bool?

        enum CodingKeys: String, CodingKey {case repoUrl = "repoUrl"
        case branch = "branch"
        case isManualIntegration = "isManualIntegration"
        case deploymentRollbackEnabled = "deploymentRollbackEnabled"
        case isMercurial = "isMercurial"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.repoUrl) {
        self.repoUrl = try container.decode(String?.self, forKey: .repoUrl)
    }
    if container.contains(.branch) {
        self.branch = try container.decode(String?.self, forKey: .branch)
    }
    if container.contains(.isManualIntegration) {
        self.isManualIntegration = try container.decode(Bool?.self, forKey: .isManualIntegration)
    }
    if container.contains(.deploymentRollbackEnabled) {
        self.deploymentRollbackEnabled = try container.decode(Bool?.self, forKey: .deploymentRollbackEnabled)
    }
    if container.contains(.isMercurial) {
        self.isMercurial = try container.decode(Bool?.self, forKey: .isMercurial)
    }
    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.repoUrl != nil {try container.encode(self.repoUrl, forKey: .repoUrl)}
    if self.branch != nil {try container.encode(self.branch, forKey: .branch)}
    if self.isManualIntegration != nil {try container.encode(self.isManualIntegration, forKey: .isManualIntegration)}
    if self.deploymentRollbackEnabled != nil {try container.encode(self.deploymentRollbackEnabled, forKey: .deploymentRollbackEnabled)}
    if self.isMercurial != nil {try container.encode(self.isMercurial, forKey: .isMercurial)}
  }
}

extension DataFactory {
  public static func createSiteSourceControlPropertiesProtocol() -> SiteSourceControlPropertiesProtocol {
    return SiteSourceControlPropertiesData()
  }
}


// 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 SkuCapacityData : SkuCapacityProtocol {
    public var minimum: Int32?
    public var maximum: Int32?
    public var _default: Int32?
    public var scaleType: String?

        enum CodingKeys: String, CodingKey {case minimum = "minimum"
        case maximum = "maximum"
        case _default = "default"
        case scaleType = "scaleType"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.minimum) {
        self.minimum = try container.decode(Int32?.self, forKey: .minimum)
    }
    if container.contains(.maximum) {
        self.maximum = try container.decode(Int32?.self, forKey: .maximum)
    }
    if container.contains(._default) {
        self._default = try container.decode(Int32?.self, forKey: ._default)
    }
    if container.contains(.scaleType) {
        self.scaleType = try container.decode(String?.self, forKey: .scaleType)
    }
    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.minimum != nil {try container.encode(self.minimum, forKey: .minimum)}
    if self.maximum != nil {try container.encode(self.maximum, forKey: .maximum)}
    if self._default != nil {try container.encode(self._default, forKey: ._default)}
    if self.scaleType != nil {try container.encode(self.scaleType, forKey: .scaleType)}
  }
}

extension DataFactory {
  public static func createSkuCapacityProtocol() -> SkuCapacityProtocol {
    return SkuCapacityData()
  }
}


// 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 SkuDescriptionData : SkuDescriptionProtocol {
    public var name: String?
    public var tier: String?
    public var size: String?
    public var family: String?
    public var capacity: Int32?
    public var skuCapacity: 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 skuCapacity = "skuCapacity"
        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(Int32?.self, forKey: .capacity)
    }
    if container.contains(.skuCapacity) {
        self.skuCapacity = try container.decode(SkuCapacityData?.self, forKey: .skuCapacity)
    }
    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, forKey: .capacity)}
    if self.skuCapacity != nil {try container.encode(self.skuCapacity as! SkuCapacityData?, forKey: .skuCapacity)}
    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 createSkuDescriptionProtocol() -> SkuDescriptionProtocol {
    return SkuDescriptionData()
  }
}


// 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 SkuInfoCollectionData : SkuInfoCollectionProtocol {
    public var value: [SkuInfoProtocol]
    public var _nextLink: String?

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

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

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([SkuInfoData].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! [SkuInfoData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createSkuInfoCollectionProtocol(value: [SkuInfoProtocol]) -> SkuInfoCollectionProtocol {
    return SkuInfoCollectionData(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 SkuInfoData : SkuInfoProtocol {
    public var resourceType: String?
    public var sku: SkuDescriptionProtocol?
    public var capacity: SkuCapacityProtocol?

        enum CodingKeys: String, CodingKey {case resourceType = "resourceType"
        case sku = "sku"
        case capacity = "capacity"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.resourceType) {
        self.resourceType = try container.decode(String?.self, forKey: .resourceType)
    }
    if container.contains(.sku) {
        self.sku = try container.decode(SkuDescriptionData?.self, forKey: .sku)
    }
    if container.contains(.capacity) {
        self.capacity = try container.decode(SkuCapacityData?.self, forKey: .capacity)
    }
    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.resourceType != nil {try container.encode(self.resourceType, forKey: .resourceType)}
    if self.sku != nil {try container.encode(self.sku as! SkuDescriptionData?, forKey: .sku)}
    if self.capacity != nil {try container.encode(self.capacity as! SkuCapacityData?, forKey: .capacity)}
  }
}

extension DataFactory {
  public static func createSkuInfoProtocol() -> SkuInfoProtocol {
    return SkuInfoData()
  }
}


// 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 SkuInfosData : SkuInfosProtocol {
    public var resourceType: String?
    public var skus: [GlobalCsmSkuDescriptionProtocol?]?

        enum CodingKeys: String, CodingKey {case resourceType = "resourceType"
        case skus = "skus"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.resourceType) {
        self.resourceType = try container.decode(String?.self, forKey: .resourceType)
    }
    if container.contains(.skus) {
        self.skus = try container.decode([GlobalCsmSkuDescriptionData?]?.self, forKey: .skus)
    }
    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.resourceType != nil {try container.encode(self.resourceType, forKey: .resourceType)}
    if self.skus != nil {try container.encode(self.skus as! [GlobalCsmSkuDescriptionData?]?, forKey: .skus)}
  }
}

extension DataFactory {
  public static func createSkuInfosProtocol() -> SkuInfosProtocol {
    return SkuInfosData()
  }
}


// SkuName enumerates the values for sku name.

// 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 SkuNameEnum: String, Codable
{
// SkuNameBasic specifies the sku name basic state for sku name.
    case SkuNameBasic = "Basic"
// SkuNameDynamic specifies the sku name dynamic state for sku name.
    case SkuNameDynamic = "Dynamic"
// SkuNameFree specifies the sku name free state for sku name.
    case SkuNameFree = "Free"
// SkuNameIsolated specifies the sku name isolated state for sku name.
    case SkuNameIsolated = "Isolated"
// SkuNamePremium specifies the sku name premium state for sku name.
    case SkuNamePremium = "Premium"
// SkuNamePremiumV2 specifies the sku name premium v2 state for sku name.
    case SkuNamePremiumV2 = "PremiumV2"
// SkuNameShared specifies the sku name shared state for sku name.
    case SkuNameShared = "Shared"
// SkuNameStandard specifies the sku name standard state for sku name.
    case SkuNameStandard = "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 SlotConfigNamesData : SlotConfigNamesProtocol {
    public var connectionStringNames: [String]?
    public var appSettingNames: [String]?

        enum CodingKeys: String, CodingKey {case connectionStringNames = "connectionStringNames"
        case appSettingNames = "appSettingNames"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.connectionStringNames) {
        self.connectionStringNames = try container.decode([String]?.self, forKey: .connectionStringNames)
    }
    if container.contains(.appSettingNames) {
        self.appSettingNames = try container.decode([String]?.self, forKey: .appSettingNames)
    }
    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.connectionStringNames != nil {try container.encode(self.connectionStringNames as! [String]?, forKey: .connectionStringNames)}
    if self.appSettingNames != nil {try container.encode(self.appSettingNames as! [String]?, forKey: .appSettingNames)}
  }
}

extension DataFactory {
  public static func createSlotConfigNamesProtocol() -> SlotConfigNamesProtocol {
    return SlotConfigNamesData()
  }
}


// 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 SlotConfigNamesResourceData : SlotConfigNamesResourceProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SlotConfigNamesProtocol?

        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(SlotConfigNamesData?.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! SlotConfigNamesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSlotConfigNamesResourceProtocol() -> SlotConfigNamesResourceProtocol {
    return SlotConfigNamesResourceData()
  }
}


// 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 SlotDifferenceCollectionData : SlotDifferenceCollectionProtocol {
    public var value: [SlotDifferenceProtocol]
    public var _nextLink: String?

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

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

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([SlotDifferenceData].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! [SlotDifferenceData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createSlotDifferenceCollectionProtocol(value: [SlotDifferenceProtocol]) -> SlotDifferenceCollectionProtocol {
    return SlotDifferenceCollectionData(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 SlotDifferenceData : SlotDifferenceProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SlotDifferencePropertiesProtocol?

        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(SlotDifferencePropertiesData?.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! SlotDifferencePropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSlotDifferenceProtocol() -> SlotDifferenceProtocol {
    return SlotDifferenceData()
  }
}


// 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 SlotDifferencePropertiesData : SlotDifferencePropertiesProtocol {
    public var type: String?
    public var settingType: String?
    public var diffRule: String?
    public var settingName: String?
    public var valueInCurrentSlot: String?
    public var valueInTargetSlot: String?
    public var description: String?

        enum CodingKeys: String, CodingKey {case type = "type"
        case settingType = "settingType"
        case diffRule = "diffRule"
        case settingName = "settingName"
        case valueInCurrentSlot = "valueInCurrentSlot"
        case valueInTargetSlot = "valueInTargetSlot"
        case description = "description"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.settingType) {
        self.settingType = try container.decode(String?.self, forKey: .settingType)
    }
    if container.contains(.diffRule) {
        self.diffRule = try container.decode(String?.self, forKey: .diffRule)
    }
    if container.contains(.settingName) {
        self.settingName = try container.decode(String?.self, forKey: .settingName)
    }
    if container.contains(.valueInCurrentSlot) {
        self.valueInCurrentSlot = try container.decode(String?.self, forKey: .valueInCurrentSlot)
    }
    if container.contains(.valueInTargetSlot) {
        self.valueInTargetSlot = try container.decode(String?.self, forKey: .valueInTargetSlot)
    }
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    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.type != nil {try container.encode(self.type, forKey: .type)}
    if self.settingType != nil {try container.encode(self.settingType, forKey: .settingType)}
    if self.diffRule != nil {try container.encode(self.diffRule, forKey: .diffRule)}
    if self.settingName != nil {try container.encode(self.settingName, forKey: .settingName)}
    if self.valueInCurrentSlot != nil {try container.encode(self.valueInCurrentSlot, forKey: .valueInCurrentSlot)}
    if self.valueInTargetSlot != nil {try container.encode(self.valueInTargetSlot, forKey: .valueInTargetSlot)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
  }
}

extension DataFactory {
  public static func createSlotDifferencePropertiesProtocol() -> SlotDifferencePropertiesProtocol {
    return SlotDifferencePropertiesData()
  }
}


// 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 SlotSwapStatusData : SlotSwapStatusProtocol {
    public var timestampUtc: Date?
    public var sourceSlotName: String?
    public var destinationSlotName: String?

        enum CodingKeys: String, CodingKey {case timestampUtc = "timestampUtc"
        case sourceSlotName = "sourceSlotName"
        case destinationSlotName = "destinationSlotName"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.timestampUtc) {
        self.timestampUtc = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .timestampUtc)), format: .dateTime)
    }
    if container.contains(.sourceSlotName) {
        self.sourceSlotName = try container.decode(String?.self, forKey: .sourceSlotName)
    }
    if container.contains(.destinationSlotName) {
        self.destinationSlotName = try container.decode(String?.self, forKey: .destinationSlotName)
    }
    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.timestampUtc != nil {
        try container.encode(DateConverter.toString(date: self.timestampUtc!, format: .dateTime), forKey: .timestampUtc)
    }
    if self.sourceSlotName != nil {try container.encode(self.sourceSlotName, forKey: .sourceSlotName)}
    if self.destinationSlotName != nil {try container.encode(self.destinationSlotName, forKey: .destinationSlotName)}
  }
}

extension DataFactory {
  public static func createSlotSwapStatusProtocol() -> SlotSwapStatusProtocol {
    return SlotSwapStatusData()
  }
}


// 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 SlowRequestsBasedTriggerData : SlowRequestsBasedTriggerProtocol {
    public var timeTaken: String?
    public var count: Int32?
    public var timeInterval: String?

        enum CodingKeys: String, CodingKey {case timeTaken = "timeTaken"
        case count = "count"
        case timeInterval = "timeInterval"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.timeTaken) {
        self.timeTaken = try container.decode(String?.self, forKey: .timeTaken)
    }
    if container.contains(.count) {
        self.count = try container.decode(Int32?.self, forKey: .count)
    }
    if container.contains(.timeInterval) {
        self.timeInterval = try container.decode(String?.self, forKey: .timeInterval)
    }
    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.timeTaken != nil {try container.encode(self.timeTaken, forKey: .timeTaken)}
    if self.count != nil {try container.encode(self.count, forKey: .count)}
    if self.timeInterval != nil {try container.encode(self.timeInterval, forKey: .timeInterval)}
  }
}

extension DataFactory {
  public static func createSlowRequestsBasedTriggerProtocol() -> SlowRequestsBasedTriggerProtocol {
    return SlowRequestsBasedTriggerData()
  }
}


// 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 SnapshotCollectionData : SnapshotCollectionProtocol {
    public var value: [SnapshotProtocol]
    public var _nextLink: String?

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

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

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([SnapshotData].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! [SnapshotData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createSnapshotCollectionProtocol(value: [SnapshotProtocol]) -> SnapshotCollectionProtocol {
    return SnapshotCollectionData(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 SnapshotData : SnapshotProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SnapshotPropertiesProtocol?

        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(SnapshotPropertiesData?.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! SnapshotPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSnapshotProtocol() -> SnapshotProtocol {
    return SnapshotData()
  }
}


// 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 SnapshotPropertiesData : SnapshotPropertiesProtocol {
    public var time: String?

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

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.time) {
        self.time = try container.decode(String?.self, forKey: .time)
    }
    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.time != nil {try container.encode(self.time, forKey: .time)}
  }
}

extension DataFactory {
  public static func createSnapshotPropertiesProtocol() -> SnapshotPropertiesProtocol {
    return SnapshotPropertiesData()
  }
}


// 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 SnapshotRecoveryRequestData : SnapshotRecoveryRequestProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SnapshotRecoveryRequestPropertiesProtocol?

        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(SnapshotRecoveryRequestPropertiesData?.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! SnapshotRecoveryRequestPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSnapshotRecoveryRequestProtocol() -> SnapshotRecoveryRequestProtocol {
    return SnapshotRecoveryRequestData()
  }
}


// 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 SnapshotRecoveryRequestPropertiesData : SnapshotRecoveryRequestPropertiesProtocol {
    public var snapshotTime: String?
    public var recoveryTarget: SnapshotRecoveryTargetProtocol?
    public var overwrite: Bool?
    public var recoverConfiguration: Bool?
    public var ignoreConflictingHostNames: Bool?

        enum CodingKeys: String, CodingKey {case snapshotTime = "snapshotTime"
        case recoveryTarget = "recoveryTarget"
        case overwrite = "overwrite"
        case recoverConfiguration = "recoverConfiguration"
        case ignoreConflictingHostNames = "ignoreConflictingHostNames"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.snapshotTime) {
        self.snapshotTime = try container.decode(String?.self, forKey: .snapshotTime)
    }
    if container.contains(.recoveryTarget) {
        self.recoveryTarget = try container.decode(SnapshotRecoveryTargetData?.self, forKey: .recoveryTarget)
    }
    if container.contains(.overwrite) {
        self.overwrite = try container.decode(Bool?.self, forKey: .overwrite)
    }
    if container.contains(.recoverConfiguration) {
        self.recoverConfiguration = try container.decode(Bool?.self, forKey: .recoverConfiguration)
    }
    if container.contains(.ignoreConflictingHostNames) {
        self.ignoreConflictingHostNames = try container.decode(Bool?.self, forKey: .ignoreConflictingHostNames)
    }
    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.snapshotTime != nil {try container.encode(self.snapshotTime, forKey: .snapshotTime)}
    if self.recoveryTarget != nil {try container.encode(self.recoveryTarget as! SnapshotRecoveryTargetData?, forKey: .recoveryTarget)}
    if self.overwrite != nil {try container.encode(self.overwrite, forKey: .overwrite)}
    if self.recoverConfiguration != nil {try container.encode(self.recoverConfiguration, forKey: .recoverConfiguration)}
    if self.ignoreConflictingHostNames != nil {try container.encode(self.ignoreConflictingHostNames, forKey: .ignoreConflictingHostNames)}
  }
}

extension DataFactory {
  public static func createSnapshotRecoveryRequestPropertiesProtocol() -> SnapshotRecoveryRequestPropertiesProtocol {
    return SnapshotRecoveryRequestPropertiesData()
  }
}


// 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 SnapshotRecoveryTargetData : SnapshotRecoveryTargetProtocol {
    public var location: String?
    public var id: String?

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

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.location) {
        self.location = try container.decode(String?.self, forKey: .location)
    }
    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.location != nil {try container.encode(self.location, forKey: .location)}
    if self.id != nil {try container.encode(self.id, forKey: .id)}
  }
}

extension DataFactory {
  public static func createSnapshotRecoveryTargetProtocol() -> SnapshotRecoveryTargetProtocol {
    return SnapshotRecoveryTargetData()
  }
}


// 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 SolutionData : SolutionProtocol {
    public var id: Double?
    public var displayName: String?
    public var order: Double?
    public var description: String?
    public var type: SolutionTypeEnum?
    public var data: [[NameValuePairProtocol?]?]?
    public var metadata: [[NameValuePairProtocol?]?]?

        enum CodingKeys: String, CodingKey {case id = "id"
        case displayName = "displayName"
        case order = "order"
        case description = "description"
        case type = "type"
        case data = "data"
        case metadata = "metadata"
        }

  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(Double?.self, forKey: .id)
    }
    if container.contains(.displayName) {
        self.displayName = try container.decode(String?.self, forKey: .displayName)
    }
    if container.contains(.order) {
        self.order = try container.decode(Double?.self, forKey: .order)
    }
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    if container.contains(.type) {
        self.type = try container.decode(SolutionTypeEnum?.self, forKey: .type)
    }
    if container.contains(.data) {
        self.data = try container.decode([[NameValuePairData?]?]?.self, forKey: .data)
    }
    if container.contains(.metadata) {
        self.metadata = try container.decode([[NameValuePairData?]?]?.self, forKey: .metadata)
    }
    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.displayName != nil {try container.encode(self.displayName, forKey: .displayName)}
    if self.order != nil {try container.encode(self.order, forKey: .order)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.data != nil {try container.encode(self.data as! [[NameValuePairData?]?]?, forKey: .data)}
    if self.metadata != nil {try container.encode(self.metadata as! [[NameValuePairData?]?]?, forKey: .metadata)}
  }
}

extension DataFactory {
  public static func createSolutionProtocol() -> SolutionProtocol {
    return SolutionData()
  }
}


// SolutionType enumerates the values for solution 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 SolutionTypeEnum: String, Codable
{
// BestPractices specifies the best practices state for solution type.
    case BestPractices = "BestPractices"
// DeepInvestigation specifies the deep investigation state for solution type.
    case DeepInvestigation = "DeepInvestigation"
// QuickSolution specifies the quick solution state for solution type.
    case QuickSolution = "QuickSolution"
}


// 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 SourceControlCollectionData : SourceControlCollectionProtocol {
    public var value: [SourceControlProtocol]
    public var _nextLink: String?

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

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

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.value = try container.decode([SourceControlData].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! [SourceControlData], forKey: .value)
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createSourceControlCollectionProtocol(value: [SourceControlProtocol]) -> SourceControlCollectionProtocol {
    return SourceControlCollectionData(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 SourceControlData : SourceControlProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SourceControlPropertiesProtocol?

        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(SourceControlPropertiesData?.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! SourceControlPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createSourceControlProtocol() -> SourceControlProtocol {
    return SourceControlData()
  }
}