// IssueType enumerates the values for issue 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 IssueTypeEnum: String, Codable
{
// AppCrash specifies the app crash state for issue type.
    case AppCrash = "AppCrash"
// AppDeployment specifies the app deployment state for issue type.
    case AppDeployment = "AppDeployment"
// AseDeployment specifies the ase deployment state for issue type.
    case AseDeployment = "AseDeployment"
// Other specifies the other state for issue type.
    case Other = "Other"
// PlatformIssue specifies the platform issue state for issue type.
    case PlatformIssue = "PlatformIssue"
// RuntimeIssueDetected specifies the runtime issue detected state for issue type.
    case RuntimeIssueDetected = "RuntimeIssueDetected"
// ServiceIncident specifies the service incident state for issue type.
    case ServiceIncident = "ServiceIncident"
// UserIssue specifies the user issue state for issue type.
    case UserIssue = "UserIssue"
}


// KeyVaultSecretStatus enumerates the values for key vault secret status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum KeyVaultSecretStatusEnum: String, Codable
{
// KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault specifies the key vault secret status azure service
// unauthorized to access key vault state for key vault secret status.
    case KeyVaultSecretStatusAzureServiceUnauthorizedToAccessKeyVault = "AzureServiceUnauthorizedToAccessKeyVault"
// KeyVaultSecretStatusCertificateOrderFailed specifies the key vault secret status certificate order failed state for
// key vault secret status.
    case KeyVaultSecretStatusCertificateOrderFailed = "CertificateOrderFailed"
// KeyVaultSecretStatusExternalPrivateKey specifies the key vault secret status external private key state for key
// vault secret status.
    case KeyVaultSecretStatusExternalPrivateKey = "ExternalPrivateKey"
// KeyVaultSecretStatusInitialized specifies the key vault secret status initialized state for key vault secret status.
    case KeyVaultSecretStatusInitialized = "Initialized"
// KeyVaultSecretStatusKeyVaultDoesNotExist specifies the key vault secret status key vault does not exist state for
// key vault secret status.
    case KeyVaultSecretStatusKeyVaultDoesNotExist = "KeyVaultDoesNotExist"
// KeyVaultSecretStatusKeyVaultSecretDoesNotExist specifies the key vault secret status key vault secret does not exist
// state for key vault secret status.
    case KeyVaultSecretStatusKeyVaultSecretDoesNotExist = "KeyVaultSecretDoesNotExist"
// KeyVaultSecretStatusOperationNotPermittedOnKeyVault specifies the key vault secret status operation not permitted on
// key vault state for key vault secret status.
    case KeyVaultSecretStatusOperationNotPermittedOnKeyVault = "OperationNotPermittedOnKeyVault"
// KeyVaultSecretStatusSucceeded specifies the key vault secret status succeeded state for key vault secret status.
    case KeyVaultSecretStatusSucceeded = "Succeeded"
// KeyVaultSecretStatusUnknown specifies the key vault secret status unknown state for key vault secret status.
    case KeyVaultSecretStatusUnknown = "Unknown"
// KeyVaultSecretStatusUnknownError specifies the key vault secret status unknown error state for key vault secret
// status.
    case KeyVaultSecretStatusUnknownError = "UnknownError"
// KeyVaultSecretStatusWaitingOnCertificateOrder specifies the key vault secret status waiting on certificate order
// state for key vault secret status.
    case KeyVaultSecretStatusWaitingOnCertificateOrder = "WaitingOnCertificateOrder"
}


// 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 LocalizableStringData : LocalizableStringProtocol {
    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 createLocalizableStringProtocol() -> LocalizableStringProtocol {
    return LocalizableStringData()
  }
}


// LogLevel enumerates the values for log level.

// 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 LogLevelEnum: String, Codable
{
// Error specifies the error state for log level.
    case Error = "Error"
// Information specifies the information state for log level.
    case Information = "Information"
// Off specifies the off state for log level.
    case Off = "Off"
// Verbose specifies the verbose state for log level.
    case Verbose = "Verbose"
// Warning specifies the warning state for log level.
    case Warning = "Warning"
}


// ManagedPipelineMode enumerates the values for managed pipeline mode.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum ManagedPipelineModeEnum: String, Codable
{
// Classic specifies the classic state for managed pipeline mode.
    case Classic = "Classic"
// Integrated specifies the integrated state for managed pipeline mode.
    case Integrated = "Integrated"
}


// 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 ManagedServiceIdentityData : ManagedServiceIdentityProtocol {
    public var type: ManagedServiceIdentityTypeEnum?
    public var tenantId: String?
    public var principalId: String?

        enum CodingKeys: String, CodingKey {case type = "type"
        case tenantId = "tenantId"
        case principalId = "principalId"
        }

  public init()  {
  }

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

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

extension DataFactory {
  public static func createManagedServiceIdentityProtocol() -> ManagedServiceIdentityProtocol {
    return ManagedServiceIdentityData()
  }
}


// ManagedServiceIdentityType enumerates the values for managed service identity 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 ManagedServiceIdentityTypeEnum: String, Codable
{
// SystemAssigned specifies the system assigned state for managed service identity type.
    case SystemAssigned = "SystemAssigned"
}


// 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 MetricAvailabililyData : MetricAvailabililyProtocol {
    public var timeGrain: String?
    public var retention: String?

        enum CodingKeys: String, CodingKey {case timeGrain = "timeGrain"
        case retention = "retention"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createMetricAvailabililyProtocol() -> MetricAvailabililyProtocol {
    return MetricAvailabililyData()
  }
}


// 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 MetricAvailabilityData : MetricAvailabilityProtocol {
    public var timeGrain: String?
    public var blobDuration: String?

        enum CodingKeys: String, CodingKey {case timeGrain = "timeGrain"
        case blobDuration = "blobDuration"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createMetricAvailabilityProtocol() -> MetricAvailabilityProtocol {
    return MetricAvailabilityData()
  }
}


// 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 MetricDefinitionData : MetricDefinitionProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: MetricDefinitionPropertiesProtocol?

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

extension DataFactory {
  public static func createMetricDefinitionProtocol() -> MetricDefinitionProtocol {
    return MetricDefinitionData()
  }
}


// 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 MetricDefinitionPropertiesData : MetricDefinitionPropertiesProtocol {
    public var name: String?
    public var unit: String?
    public var primaryAggregationType: String?
    public var metricAvailabilities: [MetricAvailabililyProtocol?]?
    public var displayName: String?

        enum CodingKeys: String, CodingKey {case name = "name"
        case unit = "unit"
        case primaryAggregationType = "primaryAggregationType"
        case metricAvailabilities = "metricAvailabilities"
        case displayName = "displayName"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.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([MetricAvailabililyData?]?.self, forKey: .metricAvailabilities)
    }
    if container.contains(.displayName) {
        self.displayName = try container.decode(String?.self, forKey: .displayName)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.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! [MetricAvailabililyData?]?, forKey: .metricAvailabilities)}
    if self.displayName != nil {try container.encode(self.displayName, forKey: .displayName)}
  }
}

extension DataFactory {
  public static func createMetricDefinitionPropertiesProtocol() -> MetricDefinitionPropertiesProtocol {
    return MetricDefinitionPropertiesData()
  }
}


// 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 MetricSpecificationData : MetricSpecificationProtocol {
    public var name: String?
    public var displayName: String?
    public var displayDescription: String?
    public var unit: String?
    public var aggregationType: String?
    public var supportsInstanceLevelAggregation: Bool?
    public var enableRegionalMdmAccount: Bool?
    public var sourceMdmAccount: String?
    public var sourceMdmNamespace: String?
    public var metricFilterPattern: String?
    public var fillGapWithZero: Bool?
    public var isInternal: Bool?
    public var dimensions: [DimensionProtocol?]?
    public var category: String?
    public var availabilities: [MetricAvailabilityProtocol?]?

        enum CodingKeys: String, CodingKey {case name = "name"
        case displayName = "displayName"
        case displayDescription = "displayDescription"
        case unit = "unit"
        case aggregationType = "aggregationType"
        case supportsInstanceLevelAggregation = "supportsInstanceLevelAggregation"
        case enableRegionalMdmAccount = "enableRegionalMdmAccount"
        case sourceMdmAccount = "sourceMdmAccount"
        case sourceMdmNamespace = "sourceMdmNamespace"
        case metricFilterPattern = "metricFilterPattern"
        case fillGapWithZero = "fillGapWithZero"
        case isInternal = "isInternal"
        case dimensions = "dimensions"
        case category = "category"
        case availabilities = "availabilities"
        }

  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(.displayName) {
        self.displayName = try container.decode(String?.self, forKey: .displayName)
    }
    if container.contains(.displayDescription) {
        self.displayDescription = try container.decode(String?.self, forKey: .displayDescription)
    }
    if container.contains(.unit) {
        self.unit = try container.decode(String?.self, forKey: .unit)
    }
    if container.contains(.aggregationType) {
        self.aggregationType = try container.decode(String?.self, forKey: .aggregationType)
    }
    if container.contains(.supportsInstanceLevelAggregation) {
        self.supportsInstanceLevelAggregation = try container.decode(Bool?.self, forKey: .supportsInstanceLevelAggregation)
    }
    if container.contains(.enableRegionalMdmAccount) {
        self.enableRegionalMdmAccount = try container.decode(Bool?.self, forKey: .enableRegionalMdmAccount)
    }
    if container.contains(.sourceMdmAccount) {
        self.sourceMdmAccount = try container.decode(String?.self, forKey: .sourceMdmAccount)
    }
    if container.contains(.sourceMdmNamespace) {
        self.sourceMdmNamespace = try container.decode(String?.self, forKey: .sourceMdmNamespace)
    }
    if container.contains(.metricFilterPattern) {
        self.metricFilterPattern = try container.decode(String?.self, forKey: .metricFilterPattern)
    }
    if container.contains(.fillGapWithZero) {
        self.fillGapWithZero = try container.decode(Bool?.self, forKey: .fillGapWithZero)
    }
    if container.contains(.isInternal) {
        self.isInternal = try container.decode(Bool?.self, forKey: .isInternal)
    }
    if container.contains(.dimensions) {
        self.dimensions = try container.decode([DimensionData?]?.self, forKey: .dimensions)
    }
    if container.contains(.category) {
        self.category = try container.decode(String?.self, forKey: .category)
    }
    if container.contains(.availabilities) {
        self.availabilities = try container.decode([MetricAvailabilityData?]?.self, forKey: .availabilities)
    }
    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.displayName != nil {try container.encode(self.displayName, forKey: .displayName)}
    if self.displayDescription != nil {try container.encode(self.displayDescription, forKey: .displayDescription)}
    if self.unit != nil {try container.encode(self.unit, forKey: .unit)}
    if self.aggregationType != nil {try container.encode(self.aggregationType, forKey: .aggregationType)}
    if self.supportsInstanceLevelAggregation != nil {try container.encode(self.supportsInstanceLevelAggregation, forKey: .supportsInstanceLevelAggregation)}
    if self.enableRegionalMdmAccount != nil {try container.encode(self.enableRegionalMdmAccount, forKey: .enableRegionalMdmAccount)}
    if self.sourceMdmAccount != nil {try container.encode(self.sourceMdmAccount, forKey: .sourceMdmAccount)}
    if self.sourceMdmNamespace != nil {try container.encode(self.sourceMdmNamespace, forKey: .sourceMdmNamespace)}
    if self.metricFilterPattern != nil {try container.encode(self.metricFilterPattern, forKey: .metricFilterPattern)}
    if self.fillGapWithZero != nil {try container.encode(self.fillGapWithZero, forKey: .fillGapWithZero)}
    if self.isInternal != nil {try container.encode(self.isInternal, forKey: .isInternal)}
    if self.dimensions != nil {try container.encode(self.dimensions as! [DimensionData?]?, forKey: .dimensions)}
    if self.category != nil {try container.encode(self.category, forKey: .category)}
    if self.availabilities != nil {try container.encode(self.availabilities as! [MetricAvailabilityData?]?, forKey: .availabilities)}
  }
}

extension DataFactory {
  public static func createMetricSpecificationProtocol() -> MetricSpecificationProtocol {
    return MetricSpecificationData()
  }
}


// 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 MigrateMySqlRequestData : MigrateMySqlRequestProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: MigrateMySqlRequestPropertiesProtocol?

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

extension DataFactory {
  public static func createMigrateMySqlRequestProtocol() -> MigrateMySqlRequestProtocol {
    return MigrateMySqlRequestData()
  }
}


// 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 MigrateMySqlRequestPropertiesData : MigrateMySqlRequestPropertiesProtocol {
    public var connectionString: String?
    public var migrationType: MySqlMigrationTypeEnum?

        enum CodingKeys: String, CodingKey {case connectionString = "connectionString"
        case migrationType = "migrationType"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createMigrateMySqlRequestPropertiesProtocol() -> MigrateMySqlRequestPropertiesProtocol {
    return MigrateMySqlRequestPropertiesData()
  }
}


// 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 MigrateMySqlStatusData : MigrateMySqlStatusProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: MigrateMySqlStatusPropertiesProtocol?

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

extension DataFactory {
  public static func createMigrateMySqlStatusProtocol() -> MigrateMySqlStatusProtocol {
    return MigrateMySqlStatusData()
  }
}


// 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 MigrateMySqlStatusPropertiesData : MigrateMySqlStatusPropertiesProtocol {
    public var migrationOperationStatus: OperationStatusEnum?
    public var operationId: String?
    public var localMySqlEnabled: Bool?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createMigrateMySqlStatusPropertiesProtocol() -> MigrateMySqlStatusPropertiesProtocol {
    return MigrateMySqlStatusPropertiesData()
  }
}


// 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 MSDeployCoreData : MSDeployCoreProtocol {
    public var packageUri: String?
    public var connectionString: String?
    public var dbType: String?
    public var setParametersXmlFileUri: String?
    public var setParameters: [String:String]?
    public var skipAppData: Bool?
    public var appOffline: Bool?

        enum CodingKeys: String, CodingKey {case packageUri = "packageUri"
        case connectionString = "connectionString"
        case dbType = "dbType"
        case setParametersXmlFileUri = "setParametersXmlFileUri"
        case setParameters = "setParameters"
        case skipAppData = "skipAppData"
        case appOffline = "appOffline"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.packageUri) {
        self.packageUri = try container.decode(String?.self, forKey: .packageUri)
    }
    if container.contains(.connectionString) {
        self.connectionString = try container.decode(String?.self, forKey: .connectionString)
    }
    if container.contains(.dbType) {
        self.dbType = try container.decode(String?.self, forKey: .dbType)
    }
    if container.contains(.setParametersXmlFileUri) {
        self.setParametersXmlFileUri = try container.decode(String?.self, forKey: .setParametersXmlFileUri)
    }
    if container.contains(.setParameters) {
        self.setParameters = try container.decode([String:String]?.self, forKey: .setParameters)
    }
    if container.contains(.skipAppData) {
        self.skipAppData = try container.decode(Bool?.self, forKey: .skipAppData)
    }
    if container.contains(.appOffline) {
        self.appOffline = try container.decode(Bool?.self, forKey: .appOffline)
    }
    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.packageUri != nil {try container.encode(self.packageUri, forKey: .packageUri)}
    if self.connectionString != nil {try container.encode(self.connectionString, forKey: .connectionString)}
    if self.dbType != nil {try container.encode(self.dbType, forKey: .dbType)}
    if self.setParametersXmlFileUri != nil {try container.encode(self.setParametersXmlFileUri, forKey: .setParametersXmlFileUri)}
    if self.setParameters != nil {try container.encode(self.setParameters, forKey: .setParameters)}
    if self.skipAppData != nil {try container.encode(self.skipAppData, forKey: .skipAppData)}
    if self.appOffline != nil {try container.encode(self.appOffline, forKey: .appOffline)}
  }
}

extension DataFactory {
  public static func createMSDeployCoreProtocol() -> MSDeployCoreProtocol {
    return MSDeployCoreData()
  }
}


// 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 MSDeployData : MSDeployProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: MSDeployCoreProtocol?

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

extension DataFactory {
  public static func createMSDeployProtocol() -> MSDeployProtocol {
    return MSDeployData()
  }
}


// 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 MSDeployLogData : MSDeployLogProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: MSDeployLogPropertiesProtocol?

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

extension DataFactory {
  public static func createMSDeployLogProtocol() -> MSDeployLogProtocol {
    return MSDeployLogData()
  }
}


// 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 MSDeployLogEntryData : MSDeployLogEntryProtocol {
    public var time: Date?
    public var type: MSDeployLogEntryTypeEnum?
    public var message: String?

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

  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(.type) {
        self.type = try container.decode(MSDeployLogEntryTypeEnum?.self, forKey: .type)
    }
    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.time != nil {
        try container.encode(DateConverter.toString(date: self.time!, format: .dateTime), forKey: .time)
    }
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.message != nil {try container.encode(self.message, forKey: .message)}
  }
}

extension DataFactory {
  public static func createMSDeployLogEntryProtocol() -> MSDeployLogEntryProtocol {
    return MSDeployLogEntryData()
  }
}


// MSDeployLogEntryType enumerates the values for ms deploy log entry 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 MSDeployLogEntryTypeEnum: String, Codable
{
// MSDeployLogEntryTypeError specifies the ms deploy log entry type error state for ms deploy log entry type.
    case MSDeployLogEntryTypeError = "Error"
// MSDeployLogEntryTypeMessage specifies the ms deploy log entry type message state for ms deploy log entry type.
    case MSDeployLogEntryTypeMessage = "Message"
// MSDeployLogEntryTypeWarning specifies the ms deploy log entry type warning state for ms deploy log entry type.
    case MSDeployLogEntryTypeWarning = "Warning"
}


// 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 MSDeployLogPropertiesData : MSDeployLogPropertiesProtocol {
    public var entries: [MSDeployLogEntryProtocol?]?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createMSDeployLogPropertiesProtocol() -> MSDeployLogPropertiesProtocol {
    return MSDeployLogPropertiesData()
  }
}


// MSDeployProvisioningState enumerates the values for ms deploy provisioning 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 MSDeployProvisioningStateEnum: String, Codable
{
// MSDeployProvisioningStateAccepted specifies the ms deploy provisioning state accepted state for ms deploy
// provisioning state.
    case MSDeployProvisioningStateAccepted = "accepted"
// MSDeployProvisioningStateCanceled specifies the ms deploy provisioning state canceled state for ms deploy
// provisioning state.
    case MSDeployProvisioningStateCanceled = "canceled"
// MSDeployProvisioningStateFailed specifies the ms deploy provisioning state failed state for ms deploy provisioning
// state.
    case MSDeployProvisioningStateFailed = "failed"
// MSDeployProvisioningStateRunning specifies the ms deploy provisioning state running state for ms deploy provisioning
// state.
    case MSDeployProvisioningStateRunning = "running"
// MSDeployProvisioningStateSucceeded specifies the ms deploy provisioning state succeeded state for ms deploy
// provisioning state.
    case MSDeployProvisioningStateSucceeded = "succeeded"
}


// 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 MSDeployStatusData : MSDeployStatusProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: MSDeployStatusPropertiesProtocol?

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

extension DataFactory {
  public static func createMSDeployStatusProtocol() -> MSDeployStatusProtocol {
    return MSDeployStatusData()
  }
}


// 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 MSDeployStatusPropertiesData : MSDeployStatusPropertiesProtocol {
    public var deployer: String?
    public var provisioningState: MSDeployProvisioningStateEnum?
    public var startTime: Date?
    public var endTime: Date?
    public var complete: Bool?

        enum CodingKeys: String, CodingKey {case deployer = "deployer"
        case provisioningState = "provisioningState"
        case startTime = "startTime"
        case endTime = "endTime"
        case complete = "complete"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createMSDeployStatusPropertiesProtocol() -> MSDeployStatusPropertiesProtocol {
    return MSDeployStatusPropertiesData()
  }
}


// MySqlMigrationType enumerates the values for my sql migration 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 MySqlMigrationTypeEnum: String, Codable
{
// LocalToRemote specifies the local to remote state for my sql migration type.
    case LocalToRemote = "LocalToRemote"
// RemoteToLocal specifies the remote to local state for my sql migration type.
    case RemoteToLocal = "RemoteToLocal"
}


// 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 NameIdentifierCollectionData : NameIdentifierCollectionProtocol {
    public var value: [NameIdentifierProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createNameIdentifierCollectionProtocol(value: [NameIdentifierProtocol]) -> NameIdentifierCollectionProtocol {
    return NameIdentifierCollectionData(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 NameIdentifierData : NameIdentifierProtocol {
    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 createNameIdentifierProtocol() -> NameIdentifierProtocol {
    return NameIdentifierData()
  }
}


// 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 NameValuePairData : NameValuePairProtocol {
    public var name: String?
    public var value: String?

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

  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(.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.name != nil {try container.encode(self.name, forKey: .name)}
    if self.value != nil {try container.encode(self.value, forKey: .value)}
  }
}

extension DataFactory {
  public static func createNameValuePairProtocol() -> NameValuePairProtocol {
    return NameValuePairData()
  }
}


// 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 NetworkAccessControlEntryData : NetworkAccessControlEntryProtocol {
    public var action: AccessControlEntryActionEnum?
    public var description: String?
    public var order: Int32?
    public var remoteSubnet: String?

        enum CodingKeys: String, CodingKey {case action = "action"
        case description = "description"
        case order = "order"
        case remoteSubnet = "remoteSubnet"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createNetworkAccessControlEntryProtocol() -> NetworkAccessControlEntryProtocol {
    return NetworkAccessControlEntryData()
  }
}


// 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 NetworkFeaturesData : NetworkFeaturesProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: NetworkFeaturesPropertiesProtocol?

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

extension DataFactory {
  public static func createNetworkFeaturesProtocol() -> NetworkFeaturesProtocol {
    return NetworkFeaturesData()
  }
}


// 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 NetworkFeaturesPropertiesData : NetworkFeaturesPropertiesProtocol {
    public var virtualNetworkName: String?
    public var virtualNetworkConnection: VnetInfoProtocol?
    public var hybridConnections: [RelayServiceConnectionEntityProtocol?]?
    public var hybridConnectionsV2: [HybridConnectionProtocol?]?

        enum CodingKeys: String, CodingKey {case virtualNetworkName = "virtualNetworkName"
        case virtualNetworkConnection = "virtualNetworkConnection"
        case hybridConnections = "hybridConnections"
        case hybridConnectionsV2 = "hybridConnectionsV2"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createNetworkFeaturesPropertiesProtocol() -> NetworkFeaturesPropertiesProtocol {
    return NetworkFeaturesPropertiesData()
  }
}


// NotificationLevel enumerates the values for notification level.

// 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 NotificationLevelEnum: String, Codable
{
// NotificationLevelCritical specifies the notification level critical state for notification level.
    case NotificationLevelCritical = "Critical"
// NotificationLevelInformation specifies the notification level information state for notification level.
    case NotificationLevelInformation = "Information"
// NotificationLevelNonUrgentSuggestion specifies the notification level non urgent suggestion state for notification
// level.
    case NotificationLevelNonUrgentSuggestion = "NonUrgentSuggestion"
// NotificationLevelWarning specifies the notification level warning state for notification level.
    case NotificationLevelWarning = "Warning"
}


// 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 OperationData : OperationProtocol {
    public var id: String?
    public var name: String?
    public var status: OperationStatusEnum?
    public var errors: [ErrorEntityProtocol?]?
    public var createdTime: Date?
    public var modifiedTime: Date?
    public var expirationTime: Date?
    public var geoMasterOperationId: String?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        case status = "status"
        case errors = "errors"
        case createdTime = "createdTime"
        case modifiedTime = "modifiedTime"
        case expirationTime = "expirationTime"
        case geoMasterOperationId = "geoMasterOperationId"
        }

  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(.status) {
        self.status = try container.decode(OperationStatusEnum?.self, forKey: .status)
    }
    if container.contains(.errors) {
        self.errors = try container.decode([ErrorEntityData?]?.self, forKey: .errors)
    }
    if container.contains(.createdTime) {
        self.createdTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .createdTime)), format: .dateTime)
    }
    if container.contains(.modifiedTime) {
        self.modifiedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .modifiedTime)), format: .dateTime)
    }
    if container.contains(.expirationTime) {
        self.expirationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .expirationTime)), format: .dateTime)
    }
    if container.contains(.geoMasterOperationId) {
        self.geoMasterOperationId = try container.decode(String?.self, forKey: .geoMasterOperationId)
    }
    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.status != nil {try container.encode(self.status, forKey: .status)}
    if self.errors != nil {try container.encode(self.errors as! [ErrorEntityData?]?, forKey: .errors)}
    if self.createdTime != nil {
        try container.encode(DateConverter.toString(date: self.createdTime!, format: .dateTime), forKey: .createdTime)
    }
    if self.modifiedTime != nil {
        try container.encode(DateConverter.toString(date: self.modifiedTime!, format: .dateTime), forKey: .modifiedTime)
    }
    if self.expirationTime != nil {
        try container.encode(DateConverter.toString(date: self.expirationTime!, format: .dateTime), forKey: .expirationTime)
    }
    if self.geoMasterOperationId != nil {try container.encode(self.geoMasterOperationId, forKey: .geoMasterOperationId)}
  }
}

extension DataFactory {
  public static func createOperationProtocol() -> OperationProtocol {
    return OperationData()
  }
}


// OperationStatus enumerates the values for operation status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum OperationStatusEnum: String, Codable
{
// OperationStatusCreated specifies the operation status created state for operation status.
    case OperationStatusCreated = "Created"
// OperationStatusFailed specifies the operation status failed state for operation status.
    case OperationStatusFailed = "Failed"
// OperationStatusInProgress specifies the operation status in progress state for operation status.
    case OperationStatusInProgress = "InProgress"
// OperationStatusSucceeded specifies the operation status succeeded state for operation status.
    case OperationStatusSucceeded = "Succeeded"
// OperationStatusTimedOut specifies the operation status timed out state for operation status.
    case OperationStatusTimedOut = "TimedOut"
}


// 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 PerfMonCounterCollectionData : PerfMonCounterCollectionProtocol {
    public var value: [PerfMonResponseProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createPerfMonCounterCollectionProtocol(value: [PerfMonResponseProtocol]) -> PerfMonCounterCollectionProtocol {
    return PerfMonCounterCollectionData(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 PerfMonResponseData : PerfMonResponseProtocol {
    public var code: String?
    public var message: String?
    public var data: PerfMonSetProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createPerfMonResponseProtocol() -> PerfMonResponseProtocol {
    return PerfMonResponseData()
  }
}


// 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 PerfMonSampleData : PerfMonSampleProtocol {
    public var time: Date?
    public var instanceName: String?
    public var value: Double?
    public var coreCount: Int32?

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

  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(.instanceName) {
        self.instanceName = try container.decode(String?.self, forKey: .instanceName)
    }
    if container.contains(.value) {
        self.value = try container.decode(Double?.self, forKey: .value)
    }
    if container.contains(.coreCount) {
        self.coreCount = try container.decode(Int32?.self, forKey: .coreCount)
    }
    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.instanceName != nil {try container.encode(self.instanceName, forKey: .instanceName)}
    if self.value != nil {try container.encode(self.value, forKey: .value)}
    if self.coreCount != nil {try container.encode(self.coreCount, forKey: .coreCount)}
  }
}

extension DataFactory {
  public static func createPerfMonSampleProtocol() -> PerfMonSampleProtocol {
    return PerfMonSampleData()
  }
}


// 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 PerfMonSetData : PerfMonSetProtocol {
    public var name: String?
    public var startTime: Date?
    public var endTime: Date?
    public var timeGrain: String?
    public var values: [PerfMonSampleProtocol?]?

        enum CodingKeys: String, CodingKey {case name = "name"
        case startTime = "startTime"
        case endTime = "endTime"
        case timeGrain = "timeGrain"
        case values = "values"
        }

  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(.startTime) {
        self.startTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .startTime)), format: .dateTime)
    }
    if container.contains(.endTime) {
        self.endTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .endTime)), format: .dateTime)
    }
    if container.contains(.timeGrain) {
        self.timeGrain = try container.decode(String?.self, forKey: .timeGrain)
    }
    if container.contains(.values) {
        self.values = try container.decode([PerfMonSampleData?]?.self, forKey: .values)
    }
    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.startTime != nil {
        try container.encode(DateConverter.toString(date: self.startTime!, format: .dateTime), forKey: .startTime)
    }
    if self.endTime != nil {
        try container.encode(DateConverter.toString(date: self.endTime!, format: .dateTime), forKey: .endTime)
    }
    if self.timeGrain != nil {try container.encode(self.timeGrain, forKey: .timeGrain)}
    if self.values != nil {try container.encode(self.values as! [PerfMonSampleData?]?, forKey: .values)}
  }
}

extension DataFactory {
  public static func createPerfMonSetProtocol() -> PerfMonSetProtocol {
    return PerfMonSetData()
  }
}


// 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 PremierAddOnData : PremierAddOnProtocol, 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: PremierAddOnPropertiesProtocol?

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

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

extension DataFactory {
  public static func createPremierAddOnProtocol(location: String) -> PremierAddOnProtocol {
    return PremierAddOnData(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 PremierAddOnOfferCollectionData : PremierAddOnOfferCollectionProtocol {
    public var value: [PremierAddOnOfferProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createPremierAddOnOfferCollectionProtocol(value: [PremierAddOnOfferProtocol]) -> PremierAddOnOfferCollectionProtocol {
    return PremierAddOnOfferCollectionData(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 PremierAddOnOfferData : PremierAddOnOfferProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: PremierAddOnOfferPropertiesProtocol?

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

extension DataFactory {
  public static func createPremierAddOnOfferProtocol() -> PremierAddOnOfferProtocol {
    return PremierAddOnOfferData()
  }
}


// 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 PremierAddOnOfferPropertiesData : PremierAddOnOfferPropertiesProtocol {
    public var sku: String?
    public var product: String?
    public var vendor: String?
    public var name: String?
    public var promoCodeRequired: Bool?
    public var quota: Int32?
    public var webHostingPlanRestrictions: AppServicePlanRestrictionsEnum?
    public var privacyPolicyUrl: String?
    public var legalTermsUrl: String?
    public var marketplacePublisher: String?
    public var marketplaceOffer: String?

        enum CodingKeys: String, CodingKey {case sku = "sku"
        case product = "product"
        case vendor = "vendor"
        case name = "name"
        case promoCodeRequired = "promoCodeRequired"
        case quota = "quota"
        case webHostingPlanRestrictions = "webHostingPlanRestrictions"
        case privacyPolicyUrl = "privacyPolicyUrl"
        case legalTermsUrl = "legalTermsUrl"
        case marketplacePublisher = "marketplacePublisher"
        case marketplaceOffer = "marketplaceOffer"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.sku) {
        self.sku = try container.decode(String?.self, forKey: .sku)
    }
    if container.contains(.product) {
        self.product = try container.decode(String?.self, forKey: .product)
    }
    if container.contains(.vendor) {
        self.vendor = try container.decode(String?.self, forKey: .vendor)
    }
    if container.contains(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.promoCodeRequired) {
        self.promoCodeRequired = try container.decode(Bool?.self, forKey: .promoCodeRequired)
    }
    if container.contains(.quota) {
        self.quota = try container.decode(Int32?.self, forKey: .quota)
    }
    if container.contains(.webHostingPlanRestrictions) {
        self.webHostingPlanRestrictions = try container.decode(AppServicePlanRestrictionsEnum?.self, forKey: .webHostingPlanRestrictions)
    }
    if container.contains(.privacyPolicyUrl) {
        self.privacyPolicyUrl = try container.decode(String?.self, forKey: .privacyPolicyUrl)
    }
    if container.contains(.legalTermsUrl) {
        self.legalTermsUrl = try container.decode(String?.self, forKey: .legalTermsUrl)
    }
    if container.contains(.marketplacePublisher) {
        self.marketplacePublisher = try container.decode(String?.self, forKey: .marketplacePublisher)
    }
    if container.contains(.marketplaceOffer) {
        self.marketplaceOffer = try container.decode(String?.self, forKey: .marketplaceOffer)
    }
    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.sku != nil {try container.encode(self.sku, forKey: .sku)}
    if self.product != nil {try container.encode(self.product, forKey: .product)}
    if self.vendor != nil {try container.encode(self.vendor, forKey: .vendor)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.promoCodeRequired != nil {try container.encode(self.promoCodeRequired, forKey: .promoCodeRequired)}
    if self.quota != nil {try container.encode(self.quota, forKey: .quota)}
    if self.webHostingPlanRestrictions != nil {try container.encode(self.webHostingPlanRestrictions, forKey: .webHostingPlanRestrictions)}
    if self.privacyPolicyUrl != nil {try container.encode(self.privacyPolicyUrl, forKey: .privacyPolicyUrl)}
    if self.legalTermsUrl != nil {try container.encode(self.legalTermsUrl, forKey: .legalTermsUrl)}
    if self.marketplacePublisher != nil {try container.encode(self.marketplacePublisher, forKey: .marketplacePublisher)}
    if self.marketplaceOffer != nil {try container.encode(self.marketplaceOffer, forKey: .marketplaceOffer)}
  }
}

extension DataFactory {
  public static func createPremierAddOnOfferPropertiesProtocol() -> PremierAddOnOfferPropertiesProtocol {
    return PremierAddOnOfferPropertiesData()
  }
}


// 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 PremierAddOnPropertiesData : PremierAddOnPropertiesProtocol {
    public var sku: String?
    public var product: String?
    public var vendor: String?
    public var premierAddOnName: String?
    public var location: String?
    public var tags: [String:String]?
    public var marketplacePublisher: String?
    public var marketplaceOffer: String?

        enum CodingKeys: String, CodingKey {case sku = "sku"
        case product = "product"
        case vendor = "vendor"
        case premierAddOnName = "name"
        case location = "location"
        case tags = "tags"
        case marketplacePublisher = "marketplacePublisher"
        case marketplaceOffer = "marketplaceOffer"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.sku) {
        self.sku = try container.decode(String?.self, forKey: .sku)
    }
    if container.contains(.product) {
        self.product = try container.decode(String?.self, forKey: .product)
    }
    if container.contains(.vendor) {
        self.vendor = try container.decode(String?.self, forKey: .vendor)
    }
    if container.contains(.premierAddOnName) {
        self.premierAddOnName = try container.decode(String?.self, forKey: .premierAddOnName)
    }
    if container.contains(.location) {
        self.location = try container.decode(String?.self, forKey: .location)
    }
    if container.contains(.tags) {
        self.tags = try container.decode([String:String]?.self, forKey: .tags)
    }
    if container.contains(.marketplacePublisher) {
        self.marketplacePublisher = try container.decode(String?.self, forKey: .marketplacePublisher)
    }
    if container.contains(.marketplaceOffer) {
        self.marketplaceOffer = try container.decode(String?.self, forKey: .marketplaceOffer)
    }
    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.sku != nil {try container.encode(self.sku, forKey: .sku)}
    if self.product != nil {try container.encode(self.product, forKey: .product)}
    if self.vendor != nil {try container.encode(self.vendor, forKey: .vendor)}
    if self.premierAddOnName != nil {try container.encode(self.premierAddOnName, forKey: .premierAddOnName)}
    if self.location != nil {try container.encode(self.location, forKey: .location)}
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    if self.marketplacePublisher != nil {try container.encode(self.marketplacePublisher, forKey: .marketplacePublisher)}
    if self.marketplaceOffer != nil {try container.encode(self.marketplaceOffer, forKey: .marketplaceOffer)}
  }
}

extension DataFactory {
  public static func createPremierAddOnPropertiesProtocol() -> PremierAddOnPropertiesProtocol {
    return PremierAddOnPropertiesData()
  }
}


// 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 ProcessInfoCollectionData : ProcessInfoCollectionProtocol {
    public var value: [ProcessInfoProtocol]
    public var _nextLink: String?

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

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

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

extension DataFactory {
  public static func createProcessInfoCollectionProtocol(value: [ProcessInfoProtocol]) -> ProcessInfoCollectionProtocol {
    return ProcessInfoCollectionData(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 ProcessInfoData : ProcessInfoProtocol, ProxyOnlyResourceProtocol {
    public var id: String?
    public var name: String?
    public var kind: String?
    public var type: String?
    public var properties: ProcessInfoPropertiesProtocol?

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

extension DataFactory {
  public static func createProcessInfoProtocol() -> ProcessInfoProtocol {
    return ProcessInfoData()
  }
}