// 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 ResourceMetricDefinitionCollectionData : ResourceMetricDefinitionCollectionProtocol {
    public var value: [ResourceMetricDefinitionProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createResourceMetricDefinitionCollectionProtocol(value: [ResourceMetricDefinitionProtocol]) -> ResourceMetricDefinitionCollectionProtocol {
    return ResourceMetricDefinitionCollectionData(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 ResourceMetricDefinitionData : ResourceMetricDefinitionProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: ResourceMetricDefinitionPropertiesProtocol?

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

extension DataFactory {
  public static func createResourceMetricDefinitionProtocol() -> ResourceMetricDefinitionProtocol {
    return ResourceMetricDefinitionData()
  }
}


// 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 ResourceMetricDefinitionPropertiesData : ResourceMetricDefinitionPropertiesProtocol {
    public var name: ResourceMetricNameProtocol?
    public var unit: String?
    public var primaryAggregationType: String?
    public var metricAvailabilities: [ResourceMetricAvailabilityProtocol?]?
    public var resourceUri: String?
    public var id: String?
    public var properties: [String:String]?

        enum CodingKeys: String, CodingKey {case name = "name"
        case unit = "unit"
        case primaryAggregationType = "primaryAggregationType"
        case metricAvailabilities = "metricAvailabilities"
        case resourceUri = "resourceUri"
        case id = "id"
        case properties = "properties"
        }

  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(ResourceMetricNameData?.self, forKey: .name)
    }
    if container.contains(.unit) {
        self.unit = try container.decode(String?.self, forKey: .unit)
    }
    if container.contains(.primaryAggregationType) {
        self.primaryAggregationType = try container.decode(String?.self, forKey: .primaryAggregationType)
    }
    if container.contains(.metricAvailabilities) {
        self.metricAvailabilities = try container.decode([ResourceMetricAvailabilityData?]?.self, forKey: .metricAvailabilities)
    }
    if container.contains(.resourceUri) {
        self.resourceUri = try container.decode(String?.self, forKey: .resourceUri)
    }
    if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.properties) {
        self.properties = try container.decode([String:String]?.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.name != nil {try container.encode(self.name as! ResourceMetricNameData?, forKey: .name)}
    if self.unit != nil {try container.encode(self.unit, forKey: .unit)}
    if self.primaryAggregationType != nil {try container.encode(self.primaryAggregationType, forKey: .primaryAggregationType)}
    if self.metricAvailabilities != nil {try container.encode(self.metricAvailabilities as! [ResourceMetricAvailabilityData?]?, forKey: .metricAvailabilities)}
    if self.resourceUri != nil {try container.encode(self.resourceUri, forKey: .resourceUri)}
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.properties != nil {try container.encode(self.properties, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createResourceMetricDefinitionPropertiesProtocol() -> ResourceMetricDefinitionPropertiesProtocol {
    return ResourceMetricDefinitionPropertiesData()
  }
}


// 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 ResourceMetricNameData : ResourceMetricNameProtocol {
    public var value: String?
    public var localizedValue: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createResourceMetricNameProtocol() -> ResourceMetricNameProtocol {
    return ResourceMetricNameData()
  }
}


// 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 ResourceMetricPropertyData : ResourceMetricPropertyProtocol {
    public var key: String?
    public var value: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createResourceMetricPropertyProtocol() -> ResourceMetricPropertyProtocol {
    return ResourceMetricPropertyData()
  }
}


// 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 ResourceMetricValueData : ResourceMetricValueProtocol {
    public var timestamp: String?
    public var average: Double?
    public var minimum: Double?
    public var maximum: Double?
    public var total: Double?
    public var count: Double?
    public var properties: [ResourceMetricPropertyProtocol?]?

        enum CodingKeys: String, CodingKey {case timestamp = "timestamp"
        case average = "average"
        case minimum = "minimum"
        case maximum = "maximum"
        case total = "total"
        case count = "count"
        case properties = "properties"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.timestamp) {
        self.timestamp = try container.decode(String?.self, forKey: .timestamp)
    }
    if container.contains(.average) {
        self.average = try container.decode(Double?.self, forKey: .average)
    }
    if container.contains(.minimum) {
        self.minimum = try container.decode(Double?.self, forKey: .minimum)
    }
    if container.contains(.maximum) {
        self.maximum = try container.decode(Double?.self, forKey: .maximum)
    }
    if container.contains(.total) {
        self.total = try container.decode(Double?.self, forKey: .total)
    }
    if container.contains(.count) {
        self.count = try container.decode(Double?.self, forKey: .count)
    }
    if container.contains(.properties) {
        self.properties = try container.decode([ResourceMetricPropertyData?]?.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.timestamp != nil {try container.encode(self.timestamp, forKey: .timestamp)}
    if self.average != nil {try container.encode(self.average, forKey: .average)}
    if self.minimum != nil {try container.encode(self.minimum, forKey: .minimum)}
    if self.maximum != nil {try container.encode(self.maximum, forKey: .maximum)}
    if self.total != nil {try container.encode(self.total, forKey: .total)}
    if self.count != nil {try container.encode(self.count, forKey: .count)}
    if self.properties != nil {try container.encode(self.properties as! [ResourceMetricPropertyData?]?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createResourceMetricValueProtocol() -> ResourceMetricValueProtocol {
    return ResourceMetricValueData()
  }
}


// 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 ResourceNameAvailabilityData : ResourceNameAvailabilityProtocol {
    public var nameAvailable: Bool?
    public var reason: InAvailabilityReasonTypeEnum?
    public var message: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createResourceNameAvailabilityProtocol() -> ResourceNameAvailabilityProtocol {
    return ResourceNameAvailabilityData()
  }
}


// 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 ResourceNameAvailabilityRequestData : ResourceNameAvailabilityRequestProtocol {
    public var name: String
    public var type: CheckNameResourceTypesEnum
    public var isFqdn: Bool?

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

  public init(name: String, type: CheckNameResourceTypesEnum)  {
    self.name = name
    self.type = type
  }

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

extension DataFactory {
  public static func createResourceNameAvailabilityRequestProtocol(name: String, type: CheckNameResourceTypesEnum) -> ResourceNameAvailabilityRequestProtocol {
    return ResourceNameAvailabilityRequestData(name: name, type: type)
  }
}


// ResourceScopeType enumerates the values for resource scope 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 ResourceScopeTypeEnum: String, Codable
{
// ServerFarm specifies the server farm state for resource scope type.
    case ServerFarm = "ServerFarm"
// Subscription specifies the subscription state for resource scope type.
    case Subscription = "Subscription"
// WebSite specifies the web site state for resource scope type.
    case WebSite = "WebSite"
}


// 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 ResponseMetaDataData : ResponseMetaDataProtocol {
    public var dataSource: DataSourceProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createResponseMetaDataProtocol() -> ResponseMetaDataProtocol {
    return ResponseMetaDataData()
  }
}


// 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 RestoreRequestData : RestoreRequestProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: RestoreRequestPropertiesProtocol?

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

extension DataFactory {
  public static func createRestoreRequestProtocol() -> RestoreRequestProtocol {
    return RestoreRequestData()
  }
}


// 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 RestoreRequestPropertiesData : RestoreRequestPropertiesProtocol {
    public var storageAccountUrl: String?
    public var blobName: String?
    public var overwrite: Bool?
    public var siteName: String?
    public var databases: [DatabaseBackupSettingProtocol?]?
    public var ignoreConflictingHostNames: Bool?
    public var ignoreDatabases: Bool?
    public var appServicePlan: String?
    public var operationType: BackupRestoreOperationTypeEnum?
    public var adjustConnectionStrings: Bool?
    public var hostingEnvironment: String?

        enum CodingKeys: String, CodingKey {case storageAccountUrl = "storageAccountUrl"
        case blobName = "blobName"
        case overwrite = "overwrite"
        case siteName = "siteName"
        case databases = "databases"
        case ignoreConflictingHostNames = "ignoreConflictingHostNames"
        case ignoreDatabases = "ignoreDatabases"
        case appServicePlan = "appServicePlan"
        case operationType = "operationType"
        case adjustConnectionStrings = "adjustConnectionStrings"
        case hostingEnvironment = "hostingEnvironment"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.storageAccountUrl) {
        self.storageAccountUrl = try container.decode(String?.self, forKey: .storageAccountUrl)
    }
    if container.contains(.blobName) {
        self.blobName = try container.decode(String?.self, forKey: .blobName)
    }
    if container.contains(.overwrite) {
        self.overwrite = try container.decode(Bool?.self, forKey: .overwrite)
    }
    if container.contains(.siteName) {
        self.siteName = try container.decode(String?.self, forKey: .siteName)
    }
    if container.contains(.databases) {
        self.databases = try container.decode([DatabaseBackupSettingData?]?.self, forKey: .databases)
    }
    if container.contains(.ignoreConflictingHostNames) {
        self.ignoreConflictingHostNames = try container.decode(Bool?.self, forKey: .ignoreConflictingHostNames)
    }
    if container.contains(.ignoreDatabases) {
        self.ignoreDatabases = try container.decode(Bool?.self, forKey: .ignoreDatabases)
    }
    if container.contains(.appServicePlan) {
        self.appServicePlan = try container.decode(String?.self, forKey: .appServicePlan)
    }
    if container.contains(.operationType) {
        self.operationType = try container.decode(BackupRestoreOperationTypeEnum?.self, forKey: .operationType)
    }
    if container.contains(.adjustConnectionStrings) {
        self.adjustConnectionStrings = try container.decode(Bool?.self, forKey: .adjustConnectionStrings)
    }
    if container.contains(.hostingEnvironment) {
        self.hostingEnvironment = try container.decode(String?.self, forKey: .hostingEnvironment)
    }
    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.storageAccountUrl != nil {try container.encode(self.storageAccountUrl, forKey: .storageAccountUrl)}
    if self.blobName != nil {try container.encode(self.blobName, forKey: .blobName)}
    if self.overwrite != nil {try container.encode(self.overwrite, forKey: .overwrite)}
    if self.siteName != nil {try container.encode(self.siteName, forKey: .siteName)}
    if self.databases != nil {try container.encode(self.databases as! [DatabaseBackupSettingData?]?, forKey: .databases)}
    if self.ignoreConflictingHostNames != nil {try container.encode(self.ignoreConflictingHostNames, forKey: .ignoreConflictingHostNames)}
    if self.ignoreDatabases != nil {try container.encode(self.ignoreDatabases, forKey: .ignoreDatabases)}
    if self.appServicePlan != nil {try container.encode(self.appServicePlan, forKey: .appServicePlan)}
    if self.operationType != nil {try container.encode(self.operationType, forKey: .operationType)}
    if self.adjustConnectionStrings != nil {try container.encode(self.adjustConnectionStrings, forKey: .adjustConnectionStrings)}
    if self.hostingEnvironment != nil {try container.encode(self.hostingEnvironment, forKey: .hostingEnvironment)}
  }
}

extension DataFactory {
  public static func createRestoreRequestPropertiesProtocol() -> RestoreRequestPropertiesProtocol {
    return RestoreRequestPropertiesData()
  }
}


// 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 RestoreResponseData : RestoreResponseProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: RestoreResponsePropertiesProtocol?

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

extension DataFactory {
  public static func createRestoreResponseProtocol() -> RestoreResponseProtocol {
    return RestoreResponseData()
  }
}


// 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 RestoreResponsePropertiesData : RestoreResponsePropertiesProtocol {
    public var operationId: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createRestoreResponsePropertiesProtocol() -> RestoreResponsePropertiesProtocol {
    return RestoreResponsePropertiesData()
  }
}


// RouteType enumerates the values for route 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 RouteTypeEnum: String, Codable
{
// DEFAULT specifies the default state for route type.
    case DEFAULT = "DEFAULT"
// INHERITED specifies the inherited state for route type.
    case INHERITED = "INHERITED"
// STATIC specifies the static state for route type.
    case STATIC = "STATIC"
}


// ScmType enumerates the values for scm 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 ScmTypeEnum: String, Codable
{
// ScmTypeBitbucketGit specifies the scm type bitbucket git state for scm type.
    case ScmTypeBitbucketGit = "BitbucketGit"
// ScmTypeBitbucketHg specifies the scm type bitbucket hg state for scm type.
    case ScmTypeBitbucketHg = "BitbucketHg"
// ScmTypeCodePlexGit specifies the scm type code plex git state for scm type.
    case ScmTypeCodePlexGit = "CodePlexGit"
// ScmTypeCodePlexHg specifies the scm type code plex hg state for scm type.
    case ScmTypeCodePlexHg = "CodePlexHg"
// ScmTypeDropbox specifies the scm type dropbox state for scm type.
    case ScmTypeDropbox = "Dropbox"
// ScmTypeExternalGit specifies the scm type external git state for scm type.
    case ScmTypeExternalGit = "ExternalGit"
// ScmTypeExternalHg specifies the scm type external hg state for scm type.
    case ScmTypeExternalHg = "ExternalHg"
// ScmTypeGitHub specifies the scm type git hub state for scm type.
    case ScmTypeGitHub = "GitHub"
// ScmTypeLocalGit specifies the scm type local git state for scm type.
    case ScmTypeLocalGit = "LocalGit"
// ScmTypeNone specifies the scm type none state for scm type.
    case ScmTypeNone = "None"
// ScmTypeOneDrive specifies the scm type one drive state for scm type.
    case ScmTypeOneDrive = "OneDrive"
// ScmTypeTfs specifies the scm type tfs state for scm type.
    case ScmTypeTfs = "Tfs"
// ScmTypeVSO specifies the scm type vso state for scm type.
    case ScmTypeVSO = "VSO"
}


// 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 ServiceSpecificationData : ServiceSpecificationProtocol {
    public var metricSpecifications: [MetricSpecificationProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createServiceSpecificationProtocol() -> ServiceSpecificationProtocol {
    return ServiceSpecificationData()
  }
}


// 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 SiteAuthSettingsData : SiteAuthSettingsProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SiteAuthSettingsPropertiesProtocol?

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

extension DataFactory {
  public static func createSiteAuthSettingsProtocol() -> SiteAuthSettingsProtocol {
    return SiteAuthSettingsData()
  }
}


// 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 SiteAuthSettingsPropertiesData : SiteAuthSettingsPropertiesProtocol {
    public var enabled: Bool?
    public var runtimeVersion: String?
    public var unauthenticatedClientAction: UnauthenticatedClientActionEnum?
    public var tokenStoreEnabled: Bool?
    public var allowedExternalRedirectUrls: [String]?
    public var defaultProvider: BuiltInAuthenticationProviderEnum?
    public var tokenRefreshExtensionHours: Double?
    public var clientId: String?
    public var clientSecret: String?
    public var issuer: String?
    public var allowedAudiences: [String]?
    public var additionalLoginParams: [String]?
    public var googleClientId: String?
    public var googleClientSecret: String?
    public var googleOAuthScopes: [String]?
    public var facebookAppId: String?
    public var facebookAppSecret: String?
    public var facebookOAuthScopes: [String]?
    public var twitterConsumerKey: String?
    public var twitterConsumerSecret: String?
    public var microsoftAccountClientId: String?
    public var microsoftAccountClientSecret: String?
    public var microsoftAccountOAuthScopes: [String]?

        enum CodingKeys: String, CodingKey {case enabled = "enabled"
        case runtimeVersion = "runtimeVersion"
        case unauthenticatedClientAction = "unauthenticatedClientAction"
        case tokenStoreEnabled = "tokenStoreEnabled"
        case allowedExternalRedirectUrls = "allowedExternalRedirectUrls"
        case defaultProvider = "defaultProvider"
        case tokenRefreshExtensionHours = "tokenRefreshExtensionHours"
        case clientId = "clientId"
        case clientSecret = "clientSecret"
        case issuer = "issuer"
        case allowedAudiences = "allowedAudiences"
        case additionalLoginParams = "additionalLoginParams"
        case googleClientId = "googleClientId"
        case googleClientSecret = "googleClientSecret"
        case googleOAuthScopes = "googleOAuthScopes"
        case facebookAppId = "facebookAppId"
        case facebookAppSecret = "facebookAppSecret"
        case facebookOAuthScopes = "facebookOAuthScopes"
        case twitterConsumerKey = "twitterConsumerKey"
        case twitterConsumerSecret = "twitterConsumerSecret"
        case microsoftAccountClientId = "microsoftAccountClientId"
        case microsoftAccountClientSecret = "microsoftAccountClientSecret"
        case microsoftAccountOAuthScopes = "microsoftAccountOAuthScopes"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.enabled) {
        self.enabled = try container.decode(Bool?.self, forKey: .enabled)
    }
    if container.contains(.runtimeVersion) {
        self.runtimeVersion = try container.decode(String?.self, forKey: .runtimeVersion)
    }
    if container.contains(.unauthenticatedClientAction) {
        self.unauthenticatedClientAction = try container.decode(UnauthenticatedClientActionEnum?.self, forKey: .unauthenticatedClientAction)
    }
    if container.contains(.tokenStoreEnabled) {
        self.tokenStoreEnabled = try container.decode(Bool?.self, forKey: .tokenStoreEnabled)
    }
    if container.contains(.allowedExternalRedirectUrls) {
        self.allowedExternalRedirectUrls = try container.decode([String]?.self, forKey: .allowedExternalRedirectUrls)
    }
    if container.contains(.defaultProvider) {
        self.defaultProvider = try container.decode(BuiltInAuthenticationProviderEnum?.self, forKey: .defaultProvider)
    }
    if container.contains(.tokenRefreshExtensionHours) {
        self.tokenRefreshExtensionHours = try container.decode(Double?.self, forKey: .tokenRefreshExtensionHours)
    }
    if container.contains(.clientId) {
        self.clientId = try container.decode(String?.self, forKey: .clientId)
    }
    if container.contains(.clientSecret) {
        self.clientSecret = try container.decode(String?.self, forKey: .clientSecret)
    }
    if container.contains(.issuer) {
        self.issuer = try container.decode(String?.self, forKey: .issuer)
    }
    if container.contains(.allowedAudiences) {
        self.allowedAudiences = try container.decode([String]?.self, forKey: .allowedAudiences)
    }
    if container.contains(.additionalLoginParams) {
        self.additionalLoginParams = try container.decode([String]?.self, forKey: .additionalLoginParams)
    }
    if container.contains(.googleClientId) {
        self.googleClientId = try container.decode(String?.self, forKey: .googleClientId)
    }
    if container.contains(.googleClientSecret) {
        self.googleClientSecret = try container.decode(String?.self, forKey: .googleClientSecret)
    }
    if container.contains(.googleOAuthScopes) {
        self.googleOAuthScopes = try container.decode([String]?.self, forKey: .googleOAuthScopes)
    }
    if container.contains(.facebookAppId) {
        self.facebookAppId = try container.decode(String?.self, forKey: .facebookAppId)
    }
    if container.contains(.facebookAppSecret) {
        self.facebookAppSecret = try container.decode(String?.self, forKey: .facebookAppSecret)
    }
    if container.contains(.facebookOAuthScopes) {
        self.facebookOAuthScopes = try container.decode([String]?.self, forKey: .facebookOAuthScopes)
    }
    if container.contains(.twitterConsumerKey) {
        self.twitterConsumerKey = try container.decode(String?.self, forKey: .twitterConsumerKey)
    }
    if container.contains(.twitterConsumerSecret) {
        self.twitterConsumerSecret = try container.decode(String?.self, forKey: .twitterConsumerSecret)
    }
    if container.contains(.microsoftAccountClientId) {
        self.microsoftAccountClientId = try container.decode(String?.self, forKey: .microsoftAccountClientId)
    }
    if container.contains(.microsoftAccountClientSecret) {
        self.microsoftAccountClientSecret = try container.decode(String?.self, forKey: .microsoftAccountClientSecret)
    }
    if container.contains(.microsoftAccountOAuthScopes) {
        self.microsoftAccountOAuthScopes = try container.decode([String]?.self, forKey: .microsoftAccountOAuthScopes)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.enabled != nil {try container.encode(self.enabled, forKey: .enabled)}
    if self.runtimeVersion != nil {try container.encode(self.runtimeVersion, forKey: .runtimeVersion)}
    if self.unauthenticatedClientAction != nil {try container.encode(self.unauthenticatedClientAction, forKey: .unauthenticatedClientAction)}
    if self.tokenStoreEnabled != nil {try container.encode(self.tokenStoreEnabled, forKey: .tokenStoreEnabled)}
    if self.allowedExternalRedirectUrls != nil {try container.encode(self.allowedExternalRedirectUrls as! [String]?, forKey: .allowedExternalRedirectUrls)}
    if self.defaultProvider != nil {try container.encode(self.defaultProvider, forKey: .defaultProvider)}
    if self.tokenRefreshExtensionHours != nil {try container.encode(self.tokenRefreshExtensionHours, forKey: .tokenRefreshExtensionHours)}
    if self.clientId != nil {try container.encode(self.clientId, forKey: .clientId)}
    if self.clientSecret != nil {try container.encode(self.clientSecret, forKey: .clientSecret)}
    if self.issuer != nil {try container.encode(self.issuer, forKey: .issuer)}
    if self.allowedAudiences != nil {try container.encode(self.allowedAudiences as! [String]?, forKey: .allowedAudiences)}
    if self.additionalLoginParams != nil {try container.encode(self.additionalLoginParams as! [String]?, forKey: .additionalLoginParams)}
    if self.googleClientId != nil {try container.encode(self.googleClientId, forKey: .googleClientId)}
    if self.googleClientSecret != nil {try container.encode(self.googleClientSecret, forKey: .googleClientSecret)}
    if self.googleOAuthScopes != nil {try container.encode(self.googleOAuthScopes as! [String]?, forKey: .googleOAuthScopes)}
    if self.facebookAppId != nil {try container.encode(self.facebookAppId, forKey: .facebookAppId)}
    if self.facebookAppSecret != nil {try container.encode(self.facebookAppSecret, forKey: .facebookAppSecret)}
    if self.facebookOAuthScopes != nil {try container.encode(self.facebookOAuthScopes as! [String]?, forKey: .facebookOAuthScopes)}
    if self.twitterConsumerKey != nil {try container.encode(self.twitterConsumerKey, forKey: .twitterConsumerKey)}
    if self.twitterConsumerSecret != nil {try container.encode(self.twitterConsumerSecret, forKey: .twitterConsumerSecret)}
    if self.microsoftAccountClientId != nil {try container.encode(self.microsoftAccountClientId, forKey: .microsoftAccountClientId)}
    if self.microsoftAccountClientSecret != nil {try container.encode(self.microsoftAccountClientSecret, forKey: .microsoftAccountClientSecret)}
    if self.microsoftAccountOAuthScopes != nil {try container.encode(self.microsoftAccountOAuthScopes as! [String]?, forKey: .microsoftAccountOAuthScopes)}
  }
}

extension DataFactory {
  public static func createSiteAuthSettingsPropertiesProtocol() -> SiteAuthSettingsPropertiesProtocol {
    return SiteAuthSettingsPropertiesData()
  }
}


// SiteAvailabilityState enumerates the values for site availability state.

// 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 SiteAvailabilityStateEnum: String, Codable
{
// DisasterRecoveryMode specifies the disaster recovery mode state for site availability state.
    case DisasterRecoveryMode = "DisasterRecoveryMode"
// Limited specifies the limited state for site availability state.
    case Limited = "Limited"
// Normal specifies the normal state for site availability state.
    case Normal = "Normal"
}


// 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 SiteCloneabilityCriterionData : SiteCloneabilityCriterionProtocol {
    public var name: String?
    public var description: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createSiteCloneabilityCriterionProtocol() -> SiteCloneabilityCriterionProtocol {
    return SiteCloneabilityCriterionData()
  }
}


// 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 SiteCloneabilityData : SiteCloneabilityProtocol {
    public var result: CloneAbilityResultEnum?
    public var blockingFeatures: [SiteCloneabilityCriterionProtocol?]?
    public var unsupportedFeatures: [SiteCloneabilityCriterionProtocol?]?
    public var blockingCharacteristics: [SiteCloneabilityCriterionProtocol?]?

        enum CodingKeys: String, CodingKey {case result = "result"
        case blockingFeatures = "blockingFeatures"
        case unsupportedFeatures = "unsupportedFeatures"
        case blockingCharacteristics = "blockingCharacteristics"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSiteCloneabilityProtocol() -> SiteCloneabilityProtocol {
    return SiteCloneabilityData()
  }
}


// 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 SiteConfigData : SiteConfigProtocol {
    public var numberOfWorkers: Int32?
    public var defaultDocuments: [String]?
    public var netFrameworkVersion: String?
    public var phpVersion: String?
    public var pythonVersion: String?
    public var nodeVersion: String?
    public var linuxFxVersion: String?
    public var requestTracingEnabled: Bool?
    public var requestTracingExpirationTime: Date?
    public var remoteDebuggingEnabled: Bool?
    public var remoteDebuggingVersion: String?
    public var httpLoggingEnabled: Bool?
    public var logsDirectorySizeLimit: Int32?
    public var detailedErrorLoggingEnabled: Bool?
    public var publishingUsername: String?
    public var appSettings: [NameValuePairProtocol?]?
    public var connectionStrings: [ConnStringInfoProtocol?]?
    public var machineKey: SiteMachineKeyProtocol?
    public var handlerMappings: [HandlerMappingProtocol?]?
    public var documentRoot: String?
    public var scmType: ScmTypeEnum?
    public var use32BitWorkerProcess: Bool?
    public var webSocketsEnabled: Bool?
    public var alwaysOn: Bool?
    public var javaVersion: String?
    public var javaContainer: String?
    public var javaContainerVersion: String?
    public var appCommandLine: String?
    public var managedPipelineMode: ManagedPipelineModeEnum?
    public var virtualApplications: [VirtualApplicationProtocol?]?
    public var loadBalancing: SiteLoadBalancingEnum?
    public var experiments: ExperimentsProtocol?
    public var limits: SiteLimitsProtocol?
    public var autoHealEnabled: Bool?
    public var autoHealRules: AutoHealRulesProtocol?
    public var tracingOptions: String?
    public var vnetName: String?
    public var cors: CorsSettingsProtocol?
    public var push: PushSettingsProtocol?
    public var apiDefinition: ApiDefinitionInfoProtocol?
    public var autoSwapSlotName: String?
    public var localMySqlEnabled: Bool?
    public var ipSecurityRestrictions: [IpSecurityRestrictionProtocol?]?
    public var http20Enabled: Bool?
    public var minTlsVersion: SupportedTlsVersionsEnum?

        enum CodingKeys: String, CodingKey {case numberOfWorkers = "numberOfWorkers"
        case defaultDocuments = "defaultDocuments"
        case netFrameworkVersion = "netFrameworkVersion"
        case phpVersion = "phpVersion"
        case pythonVersion = "pythonVersion"
        case nodeVersion = "nodeVersion"
        case linuxFxVersion = "linuxFxVersion"
        case requestTracingEnabled = "requestTracingEnabled"
        case requestTracingExpirationTime = "requestTracingExpirationTime"
        case remoteDebuggingEnabled = "remoteDebuggingEnabled"
        case remoteDebuggingVersion = "remoteDebuggingVersion"
        case httpLoggingEnabled = "httpLoggingEnabled"
        case logsDirectorySizeLimit = "logsDirectorySizeLimit"
        case detailedErrorLoggingEnabled = "detailedErrorLoggingEnabled"
        case publishingUsername = "publishingUsername"
        case appSettings = "appSettings"
        case connectionStrings = "connectionStrings"
        case machineKey = "machineKey"
        case handlerMappings = "handlerMappings"
        case documentRoot = "documentRoot"
        case scmType = "scmType"
        case use32BitWorkerProcess = "use32BitWorkerProcess"
        case webSocketsEnabled = "webSocketsEnabled"
        case alwaysOn = "alwaysOn"
        case javaVersion = "javaVersion"
        case javaContainer = "javaContainer"
        case javaContainerVersion = "javaContainerVersion"
        case appCommandLine = "appCommandLine"
        case managedPipelineMode = "managedPipelineMode"
        case virtualApplications = "virtualApplications"
        case loadBalancing = "loadBalancing"
        case experiments = "experiments"
        case limits = "limits"
        case autoHealEnabled = "autoHealEnabled"
        case autoHealRules = "autoHealRules"
        case tracingOptions = "tracingOptions"
        case vnetName = "vnetName"
        case cors = "cors"
        case push = "push"
        case apiDefinition = "apiDefinition"
        case autoSwapSlotName = "autoSwapSlotName"
        case localMySqlEnabled = "localMySqlEnabled"
        case ipSecurityRestrictions = "ipSecurityRestrictions"
        case http20Enabled = "http20Enabled"
        case minTlsVersion = "minTlsVersion"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.numberOfWorkers) {
        self.numberOfWorkers = try container.decode(Int32?.self, forKey: .numberOfWorkers)
    }
    if container.contains(.defaultDocuments) {
        self.defaultDocuments = try container.decode([String]?.self, forKey: .defaultDocuments)
    }
    if container.contains(.netFrameworkVersion) {
        self.netFrameworkVersion = try container.decode(String?.self, forKey: .netFrameworkVersion)
    }
    if container.contains(.phpVersion) {
        self.phpVersion = try container.decode(String?.self, forKey: .phpVersion)
    }
    if container.contains(.pythonVersion) {
        self.pythonVersion = try container.decode(String?.self, forKey: .pythonVersion)
    }
    if container.contains(.nodeVersion) {
        self.nodeVersion = try container.decode(String?.self, forKey: .nodeVersion)
    }
    if container.contains(.linuxFxVersion) {
        self.linuxFxVersion = try container.decode(String?.self, forKey: .linuxFxVersion)
    }
    if container.contains(.requestTracingEnabled) {
        self.requestTracingEnabled = try container.decode(Bool?.self, forKey: .requestTracingEnabled)
    }
    if container.contains(.requestTracingExpirationTime) {
        self.requestTracingExpirationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .requestTracingExpirationTime)), format: .dateTime)
    }
    if container.contains(.remoteDebuggingEnabled) {
        self.remoteDebuggingEnabled = try container.decode(Bool?.self, forKey: .remoteDebuggingEnabled)
    }
    if container.contains(.remoteDebuggingVersion) {
        self.remoteDebuggingVersion = try container.decode(String?.self, forKey: .remoteDebuggingVersion)
    }
    if container.contains(.httpLoggingEnabled) {
        self.httpLoggingEnabled = try container.decode(Bool?.self, forKey: .httpLoggingEnabled)
    }
    if container.contains(.logsDirectorySizeLimit) {
        self.logsDirectorySizeLimit = try container.decode(Int32?.self, forKey: .logsDirectorySizeLimit)
    }
    if container.contains(.detailedErrorLoggingEnabled) {
        self.detailedErrorLoggingEnabled = try container.decode(Bool?.self, forKey: .detailedErrorLoggingEnabled)
    }
    if container.contains(.publishingUsername) {
        self.publishingUsername = try container.decode(String?.self, forKey: .publishingUsername)
    }
    if container.contains(.appSettings) {
        self.appSettings = try container.decode([NameValuePairData?]?.self, forKey: .appSettings)
    }
    if container.contains(.connectionStrings) {
        self.connectionStrings = try container.decode([ConnStringInfoData?]?.self, forKey: .connectionStrings)
    }
    if container.contains(.machineKey) {
        self.machineKey = try container.decode(SiteMachineKeyData?.self, forKey: .machineKey)
    }
    if container.contains(.handlerMappings) {
        self.handlerMappings = try container.decode([HandlerMappingData?]?.self, forKey: .handlerMappings)
    }
    if container.contains(.documentRoot) {
        self.documentRoot = try container.decode(String?.self, forKey: .documentRoot)
    }
    if container.contains(.scmType) {
        self.scmType = try container.decode(ScmTypeEnum?.self, forKey: .scmType)
    }
    if container.contains(.use32BitWorkerProcess) {
        self.use32BitWorkerProcess = try container.decode(Bool?.self, forKey: .use32BitWorkerProcess)
    }
    if container.contains(.webSocketsEnabled) {
        self.webSocketsEnabled = try container.decode(Bool?.self, forKey: .webSocketsEnabled)
    }
    if container.contains(.alwaysOn) {
        self.alwaysOn = try container.decode(Bool?.self, forKey: .alwaysOn)
    }
    if container.contains(.javaVersion) {
        self.javaVersion = try container.decode(String?.self, forKey: .javaVersion)
    }
    if container.contains(.javaContainer) {
        self.javaContainer = try container.decode(String?.self, forKey: .javaContainer)
    }
    if container.contains(.javaContainerVersion) {
        self.javaContainerVersion = try container.decode(String?.self, forKey: .javaContainerVersion)
    }
    if container.contains(.appCommandLine) {
        self.appCommandLine = try container.decode(String?.self, forKey: .appCommandLine)
    }
    if container.contains(.managedPipelineMode) {
        self.managedPipelineMode = try container.decode(ManagedPipelineModeEnum?.self, forKey: .managedPipelineMode)
    }
    if container.contains(.virtualApplications) {
        self.virtualApplications = try container.decode([VirtualApplicationData?]?.self, forKey: .virtualApplications)
    }
    if container.contains(.loadBalancing) {
        self.loadBalancing = try container.decode(SiteLoadBalancingEnum?.self, forKey: .loadBalancing)
    }
    if container.contains(.experiments) {
        self.experiments = try container.decode(ExperimentsData?.self, forKey: .experiments)
    }
    if container.contains(.limits) {
        self.limits = try container.decode(SiteLimitsData?.self, forKey: .limits)
    }
    if container.contains(.autoHealEnabled) {
        self.autoHealEnabled = try container.decode(Bool?.self, forKey: .autoHealEnabled)
    }
    if container.contains(.autoHealRules) {
        self.autoHealRules = try container.decode(AutoHealRulesData?.self, forKey: .autoHealRules)
    }
    if container.contains(.tracingOptions) {
        self.tracingOptions = try container.decode(String?.self, forKey: .tracingOptions)
    }
    if container.contains(.vnetName) {
        self.vnetName = try container.decode(String?.self, forKey: .vnetName)
    }
    if container.contains(.cors) {
        self.cors = try container.decode(CorsSettingsData?.self, forKey: .cors)
    }
    if container.contains(.push) {
        self.push = try container.decode(PushSettingsData?.self, forKey: .push)
    }
    if container.contains(.apiDefinition) {
        self.apiDefinition = try container.decode(ApiDefinitionInfoData?.self, forKey: .apiDefinition)
    }
    if container.contains(.autoSwapSlotName) {
        self.autoSwapSlotName = try container.decode(String?.self, forKey: .autoSwapSlotName)
    }
    if container.contains(.localMySqlEnabled) {
        self.localMySqlEnabled = try container.decode(Bool?.self, forKey: .localMySqlEnabled)
    }
    if container.contains(.ipSecurityRestrictions) {
        self.ipSecurityRestrictions = try container.decode([IpSecurityRestrictionData?]?.self, forKey: .ipSecurityRestrictions)
    }
    if container.contains(.http20Enabled) {
        self.http20Enabled = try container.decode(Bool?.self, forKey: .http20Enabled)
    }
    if container.contains(.minTlsVersion) {
        self.minTlsVersion = try container.decode(SupportedTlsVersionsEnum?.self, forKey: .minTlsVersion)
    }
    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.numberOfWorkers != nil {try container.encode(self.numberOfWorkers, forKey: .numberOfWorkers)}
    if self.defaultDocuments != nil {try container.encode(self.defaultDocuments as! [String]?, forKey: .defaultDocuments)}
    if self.netFrameworkVersion != nil {try container.encode(self.netFrameworkVersion, forKey: .netFrameworkVersion)}
    if self.phpVersion != nil {try container.encode(self.phpVersion, forKey: .phpVersion)}
    if self.pythonVersion != nil {try container.encode(self.pythonVersion, forKey: .pythonVersion)}
    if self.nodeVersion != nil {try container.encode(self.nodeVersion, forKey: .nodeVersion)}
    if self.linuxFxVersion != nil {try container.encode(self.linuxFxVersion, forKey: .linuxFxVersion)}
    if self.requestTracingEnabled != nil {try container.encode(self.requestTracingEnabled, forKey: .requestTracingEnabled)}
    if self.requestTracingExpirationTime != nil {
        try container.encode(DateConverter.toString(date: self.requestTracingExpirationTime!, format: .dateTime), forKey: .requestTracingExpirationTime)
    }
    if self.remoteDebuggingEnabled != nil {try container.encode(self.remoteDebuggingEnabled, forKey: .remoteDebuggingEnabled)}
    if self.remoteDebuggingVersion != nil {try container.encode(self.remoteDebuggingVersion, forKey: .remoteDebuggingVersion)}
    if self.httpLoggingEnabled != nil {try container.encode(self.httpLoggingEnabled, forKey: .httpLoggingEnabled)}
    if self.logsDirectorySizeLimit != nil {try container.encode(self.logsDirectorySizeLimit, forKey: .logsDirectorySizeLimit)}
    if self.detailedErrorLoggingEnabled != nil {try container.encode(self.detailedErrorLoggingEnabled, forKey: .detailedErrorLoggingEnabled)}
    if self.publishingUsername != nil {try container.encode(self.publishingUsername, forKey: .publishingUsername)}
    if self.appSettings != nil {try container.encode(self.appSettings as! [NameValuePairData?]?, forKey: .appSettings)}
    if self.connectionStrings != nil {try container.encode(self.connectionStrings as! [ConnStringInfoData?]?, forKey: .connectionStrings)}
    if self.machineKey != nil {try container.encode(self.machineKey as! SiteMachineKeyData?, forKey: .machineKey)}
    if self.handlerMappings != nil {try container.encode(self.handlerMappings as! [HandlerMappingData?]?, forKey: .handlerMappings)}
    if self.documentRoot != nil {try container.encode(self.documentRoot, forKey: .documentRoot)}
    if self.scmType != nil {try container.encode(self.scmType, forKey: .scmType)}
    if self.use32BitWorkerProcess != nil {try container.encode(self.use32BitWorkerProcess, forKey: .use32BitWorkerProcess)}
    if self.webSocketsEnabled != nil {try container.encode(self.webSocketsEnabled, forKey: .webSocketsEnabled)}
    if self.alwaysOn != nil {try container.encode(self.alwaysOn, forKey: .alwaysOn)}
    if self.javaVersion != nil {try container.encode(self.javaVersion, forKey: .javaVersion)}
    if self.javaContainer != nil {try container.encode(self.javaContainer, forKey: .javaContainer)}
    if self.javaContainerVersion != nil {try container.encode(self.javaContainerVersion, forKey: .javaContainerVersion)}
    if self.appCommandLine != nil {try container.encode(self.appCommandLine, forKey: .appCommandLine)}
    if self.managedPipelineMode != nil {try container.encode(self.managedPipelineMode, forKey: .managedPipelineMode)}
    if self.virtualApplications != nil {try container.encode(self.virtualApplications as! [VirtualApplicationData?]?, forKey: .virtualApplications)}
    if self.loadBalancing != nil {try container.encode(self.loadBalancing, forKey: .loadBalancing)}
    if self.experiments != nil {try container.encode(self.experiments as! ExperimentsData?, forKey: .experiments)}
    if self.limits != nil {try container.encode(self.limits as! SiteLimitsData?, forKey: .limits)}
    if self.autoHealEnabled != nil {try container.encode(self.autoHealEnabled, forKey: .autoHealEnabled)}
    if self.autoHealRules != nil {try container.encode(self.autoHealRules as! AutoHealRulesData?, forKey: .autoHealRules)}
    if self.tracingOptions != nil {try container.encode(self.tracingOptions, forKey: .tracingOptions)}
    if self.vnetName != nil {try container.encode(self.vnetName, forKey: .vnetName)}
    if self.cors != nil {try container.encode(self.cors as! CorsSettingsData?, forKey: .cors)}
    if self.push != nil {try container.encode(self.push as! PushSettingsData?, forKey: .push)}
    if self.apiDefinition != nil {try container.encode(self.apiDefinition as! ApiDefinitionInfoData?, forKey: .apiDefinition)}
    if self.autoSwapSlotName != nil {try container.encode(self.autoSwapSlotName, forKey: .autoSwapSlotName)}
    if self.localMySqlEnabled != nil {try container.encode(self.localMySqlEnabled, forKey: .localMySqlEnabled)}
    if self.ipSecurityRestrictions != nil {try container.encode(self.ipSecurityRestrictions as! [IpSecurityRestrictionData?]?, forKey: .ipSecurityRestrictions)}
    if self.http20Enabled != nil {try container.encode(self.http20Enabled, forKey: .http20Enabled)}
    if self.minTlsVersion != nil {try container.encode(self.minTlsVersion, forKey: .minTlsVersion)}
  }
}

extension DataFactory {
  public static func createSiteConfigProtocol() -> SiteConfigProtocol {
    return SiteConfigData()
  }
}


// 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 SiteConfigResourceCollectionData : SiteConfigResourceCollectionProtocol {
    public var value: [SiteConfigResourceProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createSiteConfigResourceCollectionProtocol(value: [SiteConfigResourceProtocol]) -> SiteConfigResourceCollectionProtocol {
    return SiteConfigResourceCollectionData(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 SiteConfigResourceData : SiteConfigResourceProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SiteConfigProtocol?

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

extension DataFactory {
  public static func createSiteConfigResourceProtocol() -> SiteConfigResourceProtocol {
    return SiteConfigResourceData()
  }
}


// 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 SiteConfigurationSnapshotInfoCollectionData : SiteConfigurationSnapshotInfoCollectionProtocol {
    public var value: [SiteConfigurationSnapshotInfoProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createSiteConfigurationSnapshotInfoCollectionProtocol(value: [SiteConfigurationSnapshotInfoProtocol]) -> SiteConfigurationSnapshotInfoCollectionProtocol {
    return SiteConfigurationSnapshotInfoCollectionData(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 SiteConfigurationSnapshotInfoData : SiteConfigurationSnapshotInfoProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SiteConfigurationSnapshotInfoPropertiesProtocol?

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

extension DataFactory {
  public static func createSiteConfigurationSnapshotInfoProtocol() -> SiteConfigurationSnapshotInfoProtocol {
    return SiteConfigurationSnapshotInfoData()
  }
}


// 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 SiteConfigurationSnapshotInfoPropertiesData : SiteConfigurationSnapshotInfoPropertiesProtocol {
    public var time: Date?
    public var id: Int32?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createSiteConfigurationSnapshotInfoPropertiesProtocol() -> SiteConfigurationSnapshotInfoPropertiesProtocol {
    return SiteConfigurationSnapshotInfoPropertiesData()
  }
}


// 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 SiteData : SiteProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var location: String
    public var type: String?
    public var tags: [String:String]?
    public var properties: SitePropertiesProtocol?
    public var identity: ManagedServiceIdentityProtocol?

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

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

  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)
    }
    self.location = try container.decode(String.self, forKey: .location)
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.tags) {
        self.tags = try container.decode([String:String]?.self, forKey: .tags)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(SitePropertiesData?.self, forKey: .properties)
    }
    if container.contains(.identity) {
        self.identity = try container.decode(ManagedServiceIdentityData?.self, forKey: .identity)
    }
    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)}
    try container.encode(self.location, forKey: .location)
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.properties != nil {try container.encode(self.properties as! SitePropertiesData?, forKey: .properties)}
    if self.identity != nil {try container.encode(self.identity as! ManagedServiceIdentityData?, forKey: .identity)}
  }
}

extension DataFactory {
  public static func createSiteProtocol(location: String) -> SiteProtocol {
    return SiteData(location: location)
  }
}


// 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 SiteExtensionInfoCollectionData : SiteExtensionInfoCollectionProtocol {
    public var value: [SiteExtensionInfoProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createSiteExtensionInfoCollectionProtocol(value: [SiteExtensionInfoProtocol]) -> SiteExtensionInfoCollectionProtocol {
    return SiteExtensionInfoCollectionData(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 SiteExtensionInfoData : SiteExtensionInfoProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SiteExtensionInfoPropertiesProtocol?

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

extension DataFactory {
  public static func createSiteExtensionInfoProtocol() -> SiteExtensionInfoProtocol {
    return SiteExtensionInfoData()
  }
}


// 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 SiteExtensionInfoPropertiesData : SiteExtensionInfoPropertiesProtocol {
    public var id: String?
    public var title: String?
    public var type: SiteExtensionTypeEnum?
    public var summary: String?
    public var description: String?
    public var version: String?
    public var extensionUrl: String?
    public var projectUrl: String?
    public var iconUrl: String?
    public var licenseUrl: String?
    public var feedUrl: String?
    public var authors: [String]?
    public var installationArgs: String?
    public var publishedDateTime: Date?
    public var downloadCount: Int32?
    public var localIsLatestVersion: Bool?
    public var localPath: String?
    public var installedDateTime: Date?
    public var provisioningState: String?
    public var comment: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        case title = "title"
        case type = "type"
        case summary = "summary"
        case description = "description"
        case version = "version"
        case extensionUrl = "extensionUrl"
        case projectUrl = "projectUrl"
        case iconUrl = "iconUrl"
        case licenseUrl = "licenseUrl"
        case feedUrl = "feedUrl"
        case authors = "authors"
        case installationArgs = "installationArgs"
        case publishedDateTime = "publishedDateTime"
        case downloadCount = "downloadCount"
        case localIsLatestVersion = "localIsLatestVersion"
        case localPath = "localPath"
        case installedDateTime = "installedDateTime"
        case provisioningState = "provisioningState"
        case comment = "comment"
        }

  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(.title) {
        self.title = try container.decode(String?.self, forKey: .title)
    }
    if container.contains(.type) {
        self.type = try container.decode(SiteExtensionTypeEnum?.self, forKey: .type)
    }
    if container.contains(.summary) {
        self.summary = try container.decode(String?.self, forKey: .summary)
    }
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    if container.contains(.version) {
        self.version = try container.decode(String?.self, forKey: .version)
    }
    if container.contains(.extensionUrl) {
        self.extensionUrl = try container.decode(String?.self, forKey: .extensionUrl)
    }
    if container.contains(.projectUrl) {
        self.projectUrl = try container.decode(String?.self, forKey: .projectUrl)
    }
    if container.contains(.iconUrl) {
        self.iconUrl = try container.decode(String?.self, forKey: .iconUrl)
    }
    if container.contains(.licenseUrl) {
        self.licenseUrl = try container.decode(String?.self, forKey: .licenseUrl)
    }
    if container.contains(.feedUrl) {
        self.feedUrl = try container.decode(String?.self, forKey: .feedUrl)
    }
    if container.contains(.authors) {
        self.authors = try container.decode([String]?.self, forKey: .authors)
    }
    if container.contains(.installationArgs) {
        self.installationArgs = try container.decode(String?.self, forKey: .installationArgs)
    }
    if container.contains(.publishedDateTime) {
        self.publishedDateTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .publishedDateTime)), format: .dateTime)
    }
    if container.contains(.downloadCount) {
        self.downloadCount = try container.decode(Int32?.self, forKey: .downloadCount)
    }
    if container.contains(.localIsLatestVersion) {
        self.localIsLatestVersion = try container.decode(Bool?.self, forKey: .localIsLatestVersion)
    }
    if container.contains(.localPath) {
        self.localPath = try container.decode(String?.self, forKey: .localPath)
    }
    if container.contains(.installedDateTime) {
        self.installedDateTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .installedDateTime)), format: .dateTime)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.comment) {
        self.comment = try container.decode(String?.self, forKey: .comment)
    }
    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.title != nil {try container.encode(self.title, forKey: .title)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.summary != nil {try container.encode(self.summary, forKey: .summary)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
    if self.version != nil {try container.encode(self.version, forKey: .version)}
    if self.extensionUrl != nil {try container.encode(self.extensionUrl, forKey: .extensionUrl)}
    if self.projectUrl != nil {try container.encode(self.projectUrl, forKey: .projectUrl)}
    if self.iconUrl != nil {try container.encode(self.iconUrl, forKey: .iconUrl)}
    if self.licenseUrl != nil {try container.encode(self.licenseUrl, forKey: .licenseUrl)}
    if self.feedUrl != nil {try container.encode(self.feedUrl, forKey: .feedUrl)}
    if self.authors != nil {try container.encode(self.authors as! [String]?, forKey: .authors)}
    if self.installationArgs != nil {try container.encode(self.installationArgs, forKey: .installationArgs)}
    if self.publishedDateTime != nil {
        try container.encode(DateConverter.toString(date: self.publishedDateTime!, format: .dateTime), forKey: .publishedDateTime)
    }
    if self.downloadCount != nil {try container.encode(self.downloadCount, forKey: .downloadCount)}
    if self.localIsLatestVersion != nil {try container.encode(self.localIsLatestVersion, forKey: .localIsLatestVersion)}
    if self.localPath != nil {try container.encode(self.localPath, forKey: .localPath)}
    if self.installedDateTime != nil {
        try container.encode(DateConverter.toString(date: self.installedDateTime!, format: .dateTime), forKey: .installedDateTime)
    }
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.comment != nil {try container.encode(self.comment, forKey: .comment)}
  }
}

extension DataFactory {
  public static func createSiteExtensionInfoPropertiesProtocol() -> SiteExtensionInfoPropertiesProtocol {
    return SiteExtensionInfoPropertiesData()
  }
}


// SiteExtensionType enumerates the values for site extension 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 SiteExtensionTypeEnum: String, Codable
{
// Gallery specifies the gallery state for site extension type.
    case Gallery = "Gallery"
// WebRoot specifies the web root state for site extension type.
    case WebRoot = "WebRoot"
}


// 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 SiteInstanceData : SiteInstanceProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: SiteInstancePropertiesProtocol?

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

extension DataFactory {
  public static func createSiteInstanceProtocol() -> SiteInstanceProtocol {
    return SiteInstanceData()
  }
}


// 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 SiteInstancePropertiesData : SiteInstancePropertiesProtocol {
    public var name: String?

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

  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 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)}
  }
}

extension DataFactory {
  public static func createSiteInstancePropertiesProtocol() -> SiteInstancePropertiesProtocol {
    return SiteInstancePropertiesData()
  }
}