// 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 NotificationListResponseData : NotificationListResponseProtocol {
    public var value: [UpgradeNotificationProtocol?]?
    public var _nextLink: String?

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

  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([UpgradeNotificationData?]?.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)
    if self.value != nil {try container.encode(self.value as! [UpgradeNotificationData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createNotificationListResponseProtocol() -> NotificationListResponseProtocol {
    return NotificationListResponseData()
  }
}


// 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 name: String?
    public var display: OperationDisplayProtocol?

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

  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(.display) {
        self.display = try container.decode(OperationDisplayData?.self, forKey: .display)
    }
    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.display != nil {try container.encode(self.display as! OperationDisplayData?, forKey: .display)}
  }
}

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


// 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 OperationDisplayData : OperationDisplayProtocol {
    public var provider: String?
    public var operation: String?
    public var resource: String?
    public var description: String?

        enum CodingKeys: String, CodingKey {case provider = "provider"
        case operation = "operation"
        case resource = "resource"
        case description = "description"
        }

  public init()  {
  }

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

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

extension DataFactory {
  public static func createOperationDisplayProtocol() -> OperationDisplayProtocol {
    return OperationDisplayData()
  }
}


// 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 OperationListResultData : OperationListResultProtocol {
    public var value: [OperationProtocol?]?
    public var _nextLink: String?

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

  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([OperationData?]?.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)
    if self.value != nil {try container.encode(self.value as! [OperationData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createOperationListResultProtocol() -> OperationListResultProtocol {
    return OperationListResultData()
  }
}


// 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 ProxyResourceData : ProxyResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createProxyResourceProtocol() -> ProxyResourceProtocol {
    return ProxyResourceData()
  }
}


// RebootType enumerates the values for reboot 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 RebootTypeEnum: String, Codable
{
// AllNodes specifies the all nodes state for reboot type.
    case AllNodes = "AllNodes"
// PrimaryNode specifies the primary node state for reboot type.
    case PrimaryNode = "PrimaryNode"
// SecondaryNode specifies the secondary node state for reboot type.
    case SecondaryNode = "SecondaryNode"
}


// 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 RedisAccessKeysData : RedisAccessKeysProtocol {
    public var primaryKey: String?
    public var secondaryKey: String?

        enum CodingKeys: String, CodingKey {case primaryKey = "primaryKey"
        case secondaryKey = "secondaryKey"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRedisAccessKeysProtocol() -> RedisAccessKeysProtocol {
    return RedisAccessKeysData()
  }
}


// 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 RedisCommonPropertiesData : RedisCommonPropertiesProtocol {
    public var redisConfiguration: [String:String]?
    public var enableNonSslPort: Bool?
    public var tenantSettings: [String:String]?
    public var shardCount: Int32?

        enum CodingKeys: String, CodingKey {case redisConfiguration = "redisConfiguration"
        case enableNonSslPort = "enableNonSslPort"
        case tenantSettings = "tenantSettings"
        case shardCount = "shardCount"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRedisCommonPropertiesProtocol() -> RedisCommonPropertiesProtocol {
    return RedisCommonPropertiesData()
  }
}


// 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 RedisCreateParametersData : RedisCreateParametersProtocol {
    public var properties: RedisCreatePropertiesProtocol
    public var zones: [String]?
    public var location: String
    public var tags: [String:String]?

        enum CodingKeys: String, CodingKey {case properties = "properties"
        case zones = "zones"
        case location = "location"
        case tags = "tags"
        }

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

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

extension DataFactory {
  public static func createRedisCreateParametersProtocol(properties: RedisCreatePropertiesProtocol, location: String) -> RedisCreateParametersProtocol {
    return RedisCreateParametersData(properties: properties, 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 RedisCreatePropertiesData : RedisCreatePropertiesProtocol, RedisCommonPropertiesProtocol {
    public var redisConfiguration: [String:String]?
    public var enableNonSslPort: Bool?
    public var tenantSettings: [String:String]?
    public var shardCount: Int32?
    public var sku: SkuProtocol
    public var subnetId: String?
    public var staticIP: String?

        enum CodingKeys: String, CodingKey {case redisConfiguration = "redisConfiguration"
        case enableNonSslPort = "enableNonSslPort"
        case tenantSettings = "tenantSettings"
        case shardCount = "shardCount"
        case sku = "sku"
        case subnetId = "subnetId"
        case staticIP = "staticIP"
        }

  public init(sku: SkuProtocol)  {
    self.sku = sku
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.redisConfiguration) {
        self.redisConfiguration = try container.decode([String:String]?.self, forKey: .redisConfiguration)
    }
    if container.contains(.enableNonSslPort) {
        self.enableNonSslPort = try container.decode(Bool?.self, forKey: .enableNonSslPort)
    }
    if container.contains(.tenantSettings) {
        self.tenantSettings = try container.decode([String:String]?.self, forKey: .tenantSettings)
    }
    if container.contains(.shardCount) {
        self.shardCount = try container.decode(Int32?.self, forKey: .shardCount)
    }
    self.sku = try container.decode(SkuData.self, forKey: .sku)
    if container.contains(.subnetId) {
        self.subnetId = try container.decode(String?.self, forKey: .subnetId)
    }
    if container.contains(.staticIP) {
        self.staticIP = try container.decode(String?.self, forKey: .staticIP)
    }
    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.redisConfiguration != nil {try container.encode(self.redisConfiguration, forKey: .redisConfiguration)}
    if self.enableNonSslPort != nil {try container.encode(self.enableNonSslPort, forKey: .enableNonSslPort)}
    if self.tenantSettings != nil {try container.encode(self.tenantSettings, forKey: .tenantSettings)}
    if self.shardCount != nil {try container.encode(self.shardCount, forKey: .shardCount)}
    try container.encode(self.sku as! SkuData, forKey: .sku)
    if self.subnetId != nil {try container.encode(self.subnetId, forKey: .subnetId)}
    if self.staticIP != nil {try container.encode(self.staticIP, forKey: .staticIP)}
  }
}

extension DataFactory {
  public static func createRedisCreatePropertiesProtocol(sku: SkuProtocol) -> RedisCreatePropertiesProtocol {
    return RedisCreatePropertiesData(sku: sku)
  }
}


// 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 RedisFirewallRuleCreateParametersData : RedisFirewallRuleCreateParametersProtocol {
    public var properties: RedisFirewallRulePropertiesProtocol

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

  public init(properties: RedisFirewallRulePropertiesProtocol)  {
    self.properties = properties
  }

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

extension DataFactory {
  public static func createRedisFirewallRuleCreateParametersProtocol(properties: RedisFirewallRulePropertiesProtocol) -> RedisFirewallRuleCreateParametersProtocol {
    return RedisFirewallRuleCreateParametersData(properties: properties)
  }
}


// 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 RedisFirewallRuleData : RedisFirewallRuleProtocol, ProxyResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: RedisFirewallRulePropertiesProtocol

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

  public init(properties: RedisFirewallRulePropertiesProtocol)  {
    self.properties = properties
  }

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

extension DataFactory {
  public static func createRedisFirewallRuleProtocol(properties: RedisFirewallRulePropertiesProtocol) -> RedisFirewallRuleProtocol {
    return RedisFirewallRuleData(properties: properties)
  }
}


// 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 RedisFirewallRuleListResultData : RedisFirewallRuleListResultProtocol {
    public var value: [RedisFirewallRuleProtocol?]?
    public var _nextLink: String?

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

  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([RedisFirewallRuleData?]?.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)
    if self.value != nil {try container.encode(self.value as! [RedisFirewallRuleData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createRedisFirewallRuleListResultProtocol() -> RedisFirewallRuleListResultProtocol {
    return RedisFirewallRuleListResultData()
  }
}


// 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 RedisFirewallRulePropertiesData : RedisFirewallRulePropertiesProtocol {
    public var startIP: String
    public var endIP: String

        enum CodingKeys: String, CodingKey {case startIP = "startIP"
        case endIP = "endIP"
        }

  public init(startIP: String, endIP: String)  {
    self.startIP = startIP
    self.endIP = endIP
  }

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

extension DataFactory {
  public static func createRedisFirewallRulePropertiesProtocol(startIP: String, endIP: String) -> RedisFirewallRulePropertiesProtocol {
    return RedisFirewallRulePropertiesData(startIP: startIP, endIP: endIP)
  }
}


// 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 RedisForceRebootResponseData : RedisForceRebootResponseProtocol {
    public var message: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createRedisForceRebootResponseProtocol() -> RedisForceRebootResponseProtocol {
    return RedisForceRebootResponseData()
  }
}


// RedisKeyType enumerates the values for redis key 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 RedisKeyTypeEnum: String, Codable
{
// Primary specifies the primary state for redis key type.
    case Primary = "Primary"
// Secondary specifies the secondary state for redis key type.
    case Secondary = "Secondary"
}


// 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 RedisLinkedServerCreateParametersData : RedisLinkedServerCreateParametersProtocol {
    public var properties: RedisLinkedServerCreatePropertiesProtocol

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

  public init(properties: RedisLinkedServerCreatePropertiesProtocol)  {
    self.properties = properties
  }

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

extension DataFactory {
  public static func createRedisLinkedServerCreateParametersProtocol(properties: RedisLinkedServerCreatePropertiesProtocol) -> RedisLinkedServerCreateParametersProtocol {
    return RedisLinkedServerCreateParametersData(properties: properties)
  }
}


// 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 RedisLinkedServerCreatePropertiesData : RedisLinkedServerCreatePropertiesProtocol {
    public var linkedRedisCacheId: String
    public var linkedRedisCacheLocation: String
    public var serverRole: ReplicationRoleEnum

        enum CodingKeys: String, CodingKey {case linkedRedisCacheId = "linkedRedisCacheId"
        case linkedRedisCacheLocation = "linkedRedisCacheLocation"
        case serverRole = "serverRole"
        }

  public init(linkedRedisCacheId: String, linkedRedisCacheLocation: String, serverRole: ReplicationRoleEnum)  {
    self.linkedRedisCacheId = linkedRedisCacheId
    self.linkedRedisCacheLocation = linkedRedisCacheLocation
    self.serverRole = serverRole
  }

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

extension DataFactory {
  public static func createRedisLinkedServerCreatePropertiesProtocol(linkedRedisCacheId: String, linkedRedisCacheLocation: String, serverRole: ReplicationRoleEnum) -> RedisLinkedServerCreatePropertiesProtocol {
    return RedisLinkedServerCreatePropertiesData(linkedRedisCacheId: linkedRedisCacheId, linkedRedisCacheLocation: linkedRedisCacheLocation, serverRole: serverRole)
  }
}


// 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 RedisLinkedServerData : RedisLinkedServerProtocol {
    public var id: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createRedisLinkedServerProtocol() -> RedisLinkedServerProtocol {
    return RedisLinkedServerData()
  }
}


// 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 RedisLinkedServerPropertiesData : RedisLinkedServerPropertiesProtocol, RedisLinkedServerCreatePropertiesProtocol {
    public var linkedRedisCacheId: String
    public var linkedRedisCacheLocation: String
    public var serverRole: ReplicationRoleEnum
    public var provisioningState: String?

        enum CodingKeys: String, CodingKey {case linkedRedisCacheId = "linkedRedisCacheId"
        case linkedRedisCacheLocation = "linkedRedisCacheLocation"
        case serverRole = "serverRole"
        case provisioningState = "provisioningState"
        }

  public init(linkedRedisCacheId: String, linkedRedisCacheLocation: String, serverRole: ReplicationRoleEnum)  {
    self.linkedRedisCacheId = linkedRedisCacheId
    self.linkedRedisCacheLocation = linkedRedisCacheLocation
    self.serverRole = serverRole
  }

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

extension DataFactory {
  public static func createRedisLinkedServerPropertiesProtocol(linkedRedisCacheId: String, linkedRedisCacheLocation: String, serverRole: ReplicationRoleEnum) -> RedisLinkedServerPropertiesProtocol {
    return RedisLinkedServerPropertiesData(linkedRedisCacheId: linkedRedisCacheId, linkedRedisCacheLocation: linkedRedisCacheLocation, serverRole: serverRole)
  }
}


// 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 RedisLinkedServerWithPropertiesData : RedisLinkedServerWithPropertiesProtocol, ProxyResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: RedisLinkedServerPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case id = "id"
        case name = "name"
        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(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(RedisLinkedServerPropertiesData?.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.type != nil {try container.encode(self.type, forKey: .type)}
    if self.properties != nil {try container.encode(self.properties as! RedisLinkedServerPropertiesData?, forKey: .properties)}
  }
}

extension DataFactory {
  public static func createRedisLinkedServerWithPropertiesProtocol() -> RedisLinkedServerWithPropertiesProtocol {
    return RedisLinkedServerWithPropertiesData()
  }
}


// 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 RedisLinkedServerWithPropertiesListData : RedisLinkedServerWithPropertiesListProtocol {
    public var value: [RedisLinkedServerWithPropertiesProtocol?]?
    public var _nextLink: String?

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

  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([RedisLinkedServerWithPropertiesData?]?.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)
    if self.value != nil {try container.encode(self.value as! [RedisLinkedServerWithPropertiesData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createRedisLinkedServerWithPropertiesListProtocol() -> RedisLinkedServerWithPropertiesListProtocol {
    return RedisLinkedServerWithPropertiesListData()
  }
}


// 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 RedisListResultData : RedisListResultProtocol {
    public var value: [RedisResourceProtocol?]?
    public var _nextLink: String?

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

  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([RedisResourceData?]?.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)
    if self.value != nil {try container.encode(self.value as! [RedisResourceData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createRedisListResultProtocol() -> RedisListResultProtocol {
    return RedisListResultData()
  }
}


// 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 RedisPatchScheduleData : RedisPatchScheduleProtocol, ProxyResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: ScheduleEntriesProtocol

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

  public init(properties: ScheduleEntriesProtocol)  {
    self.properties = properties
  }

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

extension DataFactory {
  public static func createRedisPatchScheduleProtocol(properties: ScheduleEntriesProtocol) -> RedisPatchScheduleProtocol {
    return RedisPatchScheduleData(properties: properties)
  }
}


// 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 RedisPropertiesData : RedisPropertiesProtocol, RedisCreatePropertiesProtocol, RedisCommonPropertiesProtocol {
    public var redisConfiguration: [String:String]?
    public var enableNonSslPort: Bool?
    public var tenantSettings: [String:String]?
    public var shardCount: Int32?
    public var sku: SkuProtocol
    public var subnetId: String?
    public var staticIP: String?
    public var redisVersion: String?
    public var provisioningState: String?
    public var hostName: String?
    public var port: Int32?
    public var sslPort: Int32?
    public var accessKeys: RedisAccessKeysProtocol?
    public var linkedServers: [RedisLinkedServerProtocol?]?

        enum CodingKeys: String, CodingKey {case redisConfiguration = "redisConfiguration"
        case enableNonSslPort = "enableNonSslPort"
        case tenantSettings = "tenantSettings"
        case shardCount = "shardCount"
        case sku = "sku"
        case subnetId = "subnetId"
        case staticIP = "staticIP"
        case redisVersion = "redisVersion"
        case provisioningState = "provisioningState"
        case hostName = "hostName"
        case port = "port"
        case sslPort = "sslPort"
        case accessKeys = "accessKeys"
        case linkedServers = "linkedServers"
        }

  public init(sku: SkuProtocol)  {
    self.sku = sku
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.redisConfiguration) {
        self.redisConfiguration = try container.decode([String:String]?.self, forKey: .redisConfiguration)
    }
    if container.contains(.enableNonSslPort) {
        self.enableNonSslPort = try container.decode(Bool?.self, forKey: .enableNonSslPort)
    }
    if container.contains(.tenantSettings) {
        self.tenantSettings = try container.decode([String:String]?.self, forKey: .tenantSettings)
    }
    if container.contains(.shardCount) {
        self.shardCount = try container.decode(Int32?.self, forKey: .shardCount)
    }
    self.sku = try container.decode(SkuData.self, forKey: .sku)
    if container.contains(.subnetId) {
        self.subnetId = try container.decode(String?.self, forKey: .subnetId)
    }
    if container.contains(.staticIP) {
        self.staticIP = try container.decode(String?.self, forKey: .staticIP)
    }
    if container.contains(.redisVersion) {
        self.redisVersion = try container.decode(String?.self, forKey: .redisVersion)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.hostName) {
        self.hostName = try container.decode(String?.self, forKey: .hostName)
    }
    if container.contains(.port) {
        self.port = try container.decode(Int32?.self, forKey: .port)
    }
    if container.contains(.sslPort) {
        self.sslPort = try container.decode(Int32?.self, forKey: .sslPort)
    }
    if container.contains(.accessKeys) {
        self.accessKeys = try container.decode(RedisAccessKeysData?.self, forKey: .accessKeys)
    }
    if container.contains(.linkedServers) {
        self.linkedServers = try container.decode([RedisLinkedServerData?]?.self, forKey: .linkedServers)
    }
    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.redisConfiguration != nil {try container.encode(self.redisConfiguration, forKey: .redisConfiguration)}
    if self.enableNonSslPort != nil {try container.encode(self.enableNonSslPort, forKey: .enableNonSslPort)}
    if self.tenantSettings != nil {try container.encode(self.tenantSettings, forKey: .tenantSettings)}
    if self.shardCount != nil {try container.encode(self.shardCount, forKey: .shardCount)}
    try container.encode(self.sku as! SkuData, forKey: .sku)
    if self.subnetId != nil {try container.encode(self.subnetId, forKey: .subnetId)}
    if self.staticIP != nil {try container.encode(self.staticIP, forKey: .staticIP)}
    if self.redisVersion != nil {try container.encode(self.redisVersion, forKey: .redisVersion)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.hostName != nil {try container.encode(self.hostName, forKey: .hostName)}
    if self.port != nil {try container.encode(self.port, forKey: .port)}
    if self.sslPort != nil {try container.encode(self.sslPort, forKey: .sslPort)}
    if self.accessKeys != nil {try container.encode(self.accessKeys as! RedisAccessKeysData?, forKey: .accessKeys)}
    if self.linkedServers != nil {try container.encode(self.linkedServers as! [RedisLinkedServerData?]?, forKey: .linkedServers)}
  }
}

extension DataFactory {
  public static func createRedisPropertiesProtocol(sku: SkuProtocol) -> RedisPropertiesProtocol {
    return RedisPropertiesData(sku: sku)
  }
}


// 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 RedisRebootParametersData : RedisRebootParametersProtocol {
    public var rebootType: RebootTypeEnum
    public var shardId: Int32?

        enum CodingKeys: String, CodingKey {case rebootType = "rebootType"
        case shardId = "shardId"
        }

  public init(rebootType: RebootTypeEnum)  {
    self.rebootType = rebootType
  }

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

extension DataFactory {
  public static func createRedisRebootParametersProtocol(rebootType: RebootTypeEnum) -> RedisRebootParametersProtocol {
    return RedisRebootParametersData(rebootType: rebootType)
  }
}


// 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 RedisRegenerateKeyParametersData : RedisRegenerateKeyParametersProtocol {
    public var keyType: RedisKeyTypeEnum

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

  public init(keyType: RedisKeyTypeEnum)  {
    self.keyType = keyType
  }

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

extension DataFactory {
  public static func createRedisRegenerateKeyParametersProtocol(keyType: RedisKeyTypeEnum) -> RedisRegenerateKeyParametersProtocol {
    return RedisRegenerateKeyParametersData(keyType: keyType)
  }
}


// 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 RedisResourceData : RedisResourceProtocol, TrackedResourceProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var tags: [String:String]?
    public var location: String
    public var properties: RedisPropertiesProtocol
    public var zones: [String]?

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

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

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

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.id != nil {try container.encode(self.id, forKey: .id)}
    if self.name != nil {try container.encode(self.name, forKey: .name)}
    if self.type != nil {try container.encode(self.type, forKey: .type)}
    if self.tags != nil {try container.encode(self.tags, forKey: .tags)}
    try container.encode(self.location, forKey: .location)
    try container.encode(self.properties as! RedisPropertiesData, forKey: .properties)
    if self.zones != nil {try container.encode(self.zones as! [String]?, forKey: .zones)}
  }
}

extension DataFactory {
  public static func createRedisResourceProtocol(location: String, properties: RedisPropertiesProtocol) -> RedisResourceProtocol {
    return RedisResourceData(location: location, properties: properties)
  }
}


// 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 RedisUpdateParametersData : RedisUpdateParametersProtocol {
    public var properties: RedisUpdatePropertiesProtocol?
    public var tags: [String:String]?

        enum CodingKeys: String, CodingKey {case properties = "properties"
        case tags = "tags"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRedisUpdateParametersProtocol() -> RedisUpdateParametersProtocol {
    return RedisUpdateParametersData()
  }
}


// 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 RedisUpdatePropertiesData : RedisUpdatePropertiesProtocol, RedisCommonPropertiesProtocol {
    public var redisConfiguration: [String:String]?
    public var enableNonSslPort: Bool?
    public var tenantSettings: [String:String]?
    public var shardCount: Int32?
    public var sku: SkuProtocol?

        enum CodingKeys: String, CodingKey {case redisConfiguration = "redisConfiguration"
        case enableNonSslPort = "enableNonSslPort"
        case tenantSettings = "tenantSettings"
        case shardCount = "shardCount"
        case sku = "sku"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRedisUpdatePropertiesProtocol() -> RedisUpdatePropertiesProtocol {
    return RedisUpdatePropertiesData()
  }
}


// ReplicationRole enumerates the values for replication role.

// 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 ReplicationRoleEnum: String, Codable
{
// ReplicationRolePrimary specifies the replication role primary state for replication role.
    case ReplicationRolePrimary = "Primary"
// ReplicationRoleSecondary specifies the replication role secondary state for replication role.
    case ReplicationRoleSecondary = "Secondary"
}


// 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 ResourceData : ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createResourceProtocol() -> ResourceProtocol {
    return ResourceData()
  }
}


// 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 ScheduleEntriesData : ScheduleEntriesProtocol {
    public var scheduleEntries: [ScheduleEntryProtocol]

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

  public init(scheduleEntries: [ScheduleEntryProtocol])  {
    self.scheduleEntries = scheduleEntries
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.scheduleEntries = try container.decode([ScheduleEntryData].self, forKey: .scheduleEntries)
    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.scheduleEntries as! [ScheduleEntryData], forKey: .scheduleEntries)
  }
}

extension DataFactory {
  public static func createScheduleEntriesProtocol(scheduleEntries: [ScheduleEntryProtocol]) -> ScheduleEntriesProtocol {
    return ScheduleEntriesData(scheduleEntries: scheduleEntries)
  }
}


// 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 ScheduleEntryData : ScheduleEntryProtocol {
    public var dayOfWeek: DayOfWeekEnum
    public var startHourUtc: Int32
    public var maintenanceWindow: String?

        enum CodingKeys: String, CodingKey {case dayOfWeek = "dayOfWeek"
        case startHourUtc = "startHourUtc"
        case maintenanceWindow = "maintenanceWindow"
        }

  public init(dayOfWeek: DayOfWeekEnum, startHourUtc: Int32)  {
    self.dayOfWeek = dayOfWeek
    self.startHourUtc = startHourUtc
  }

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

extension DataFactory {
  public static func createScheduleEntryProtocol(dayOfWeek: DayOfWeekEnum, startHourUtc: Int32) -> ScheduleEntryProtocol {
    return ScheduleEntryData(dayOfWeek: dayOfWeek, startHourUtc: startHourUtc)
  }
}


// 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 SkuData : SkuProtocol {
    public var name: SkuNameEnum
    public var family: SkuFamilyEnum
    public var capacity: Int32

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

  public init(name: SkuNameEnum, family: SkuFamilyEnum, capacity: Int32)  {
    self.name = name
    self.family = family
    self.capacity = capacity
  }

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

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    try container.encode(self.name, forKey: .name)
    try container.encode(self.family, forKey: .family)
    try container.encode(self.capacity, forKey: .capacity)
  }
}

extension DataFactory {
  public static func createSkuProtocol(name: SkuNameEnum, family: SkuFamilyEnum, capacity: Int32) -> SkuProtocol {
    return SkuData(name: name, family: family, capacity: capacity)
  }
}


// SkuFamily enumerates the values for sku family.

// 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 SkuFamilyEnum: String, Codable
{
// C specifies the c state for sku family.
    case C = "C"
// P specifies the p state for sku family.
    case P = "P"
}


// SkuName enumerates the values for sku name.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum SkuNameEnum: String, Codable
{
// Basic specifies the basic state for sku name.
    case Basic = "Basic"
// Premium specifies the premium state for sku name.
    case Premium = "Premium"
// Standard specifies the standard state for sku name.
    case Standard = "Standard"
}


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

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

  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(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.tags) {
        self.tags = try container.decode([String:String]?.self, forKey: .tags)
    }
    self.location = try container.decode(String.self, forKey: .location)
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

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

extension DataFactory {
  public static func createTrackedResourceProtocol(location: String) -> TrackedResourceProtocol {
    return TrackedResourceData(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 UpgradeNotificationData : UpgradeNotificationProtocol {
    public var name: String?
    public var timestamp: Date?
    public var upsellNotification: [String:String]?

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

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

extension DataFactory {
  public static func createUpgradeNotificationProtocol() -> UpgradeNotificationProtocol {
    return UpgradeNotificationData()
  }
}


// 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
// CheckNameAvailabilityParametersProtocol is parameters body to pass for  name availability check.
public protocol CheckNameAvailabilityParametersProtocol : Codable {
     var name: String? { get set }
     var type: String? { get set }
}


// 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
// ExportRDBParametersProtocol is parameters for Redis export operation.
public protocol ExportRDBParametersProtocol : Codable {
     var format: String? { get set }
     var _prefix: String { get set }
     var container: String { get set }
}


// 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
// ImportRDBParametersProtocol is parameters for Redis import operation.
public protocol ImportRDBParametersProtocol : Codable {
     var format: String? { get set }
     var files: [String] { get set }
}


// 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
// NotificationListResponseProtocol is the response of listUpgradeNotifications.
public protocol NotificationListResponseProtocol : Codable {
     var value: [UpgradeNotificationProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// 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
// OperationDisplayProtocol is the object that describes the operation.
public protocol OperationDisplayProtocol : Codable {
     var provider: String? { get set }
     var operation: String? { get set }
     var resource: String? { get set }
     var description: String? { get set }
}


// 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
// OperationListResultProtocol is result of the request to list REST API operations. It contains a list of operations
// and a URL nextLink to get the next set of results.
public protocol OperationListResultProtocol : Codable {
     var value: [OperationProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// 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
// OperationProtocol is REST API operation
public protocol OperationProtocol : Codable {
     var name: String? { get set }
     var display: OperationDisplayProtocol? { get set }
}


// 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
// ProxyResourceProtocol is the resource model definition for a ARM proxy resource. It will have everything other than
// required location and tags
public protocol ProxyResourceProtocol : ResourceProtocol {
}


// 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
// RedisAccessKeysProtocol is redis cache access keys.
public protocol RedisAccessKeysProtocol : Codable {
     var primaryKey: String? { get set }
     var secondaryKey: String? { get set }
}


// 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
// RedisCommonPropertiesProtocol is create/Update/Get common properties of the redis cache.
public protocol RedisCommonPropertiesProtocol : Codable {
     var redisConfiguration: [String:String]? { get set }
     var enableNonSslPort: Bool? { get set }
     var tenantSettings: [String:String]? { get set }
     var shardCount: Int32? { get set }
}


// 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
// RedisCreateParametersProtocol is parameters supplied to the Create Redis operation.
public protocol RedisCreateParametersProtocol : Codable {
     var properties: RedisCreatePropertiesProtocol { get set }
     var zones: [String]? { get set }
     var location: String { get set }
     var tags: [String:String]? { get set }
}


// 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
// RedisCreatePropertiesProtocol is properties supplied to Create Redis operation.
public protocol RedisCreatePropertiesProtocol : RedisCommonPropertiesProtocol {
     var sku: SkuProtocol { get set }
     var subnetId: String? { get set }
     var staticIP: String? { get set }
}


// 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
// RedisFirewallRuleCreateParametersProtocol is parameters required for creating a firewall rule on redis cache.
public protocol RedisFirewallRuleCreateParametersProtocol : Codable {
     var properties: RedisFirewallRulePropertiesProtocol { get set }
}


// 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
// RedisFirewallRuleListResultProtocol is the response of list firewall rules Redis operation.
public protocol RedisFirewallRuleListResultProtocol : Codable {
     var value: [RedisFirewallRuleProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// 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
// RedisFirewallRulePropertiesProtocol is specifies a range of IP addresses permitted to connect to the cache
public protocol RedisFirewallRulePropertiesProtocol : Codable {
     var startIP: String { get set }
     var endIP: String { get set }
}


// 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
// RedisFirewallRuleProtocol is a firewall rule on a redis cache has a name, and describes a contiguous range of IP
// addresses permitted to connect
public protocol RedisFirewallRuleProtocol : ProxyResourceProtocol {
     var properties: RedisFirewallRulePropertiesProtocol { get set }
}


// 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
// RedisForceRebootResponseProtocol is response to force reboot for Redis cache.
public protocol RedisForceRebootResponseProtocol : Codable {
     var message: String? { get set }
}


// 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
// RedisLinkedServerCreateParametersProtocol is parameter required for creating a linked server to redis cache.
public protocol RedisLinkedServerCreateParametersProtocol : Codable {
     var properties: RedisLinkedServerCreatePropertiesProtocol { get set }
}


// 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
// RedisLinkedServerCreatePropertiesProtocol is create properties for a linked server
public protocol RedisLinkedServerCreatePropertiesProtocol : Codable {
     var linkedRedisCacheId: String { get set }
     var linkedRedisCacheLocation: String { get set }
     var serverRole: ReplicationRoleEnum { get set }
}


// 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
// RedisLinkedServerPropertiesProtocol is properties of a linked server to be returned in get/put response
public protocol RedisLinkedServerPropertiesProtocol : RedisLinkedServerCreatePropertiesProtocol {
     var provisioningState: String? { get set }
}


// 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
// RedisLinkedServerProtocol is linked server Id
public protocol RedisLinkedServerProtocol : Codable {
     var id: String? { get set }
}


// 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
// RedisLinkedServerWithPropertiesListProtocol is list of linked servers (with properites) of a Redis cache.
public protocol RedisLinkedServerWithPropertiesListProtocol : Codable {
     var value: [RedisLinkedServerWithPropertiesProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// 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
// RedisLinkedServerWithPropertiesProtocol is response to put/get linked server (with properties) for Redis cache.
public protocol RedisLinkedServerWithPropertiesProtocol : ProxyResourceProtocol {
     var properties: RedisLinkedServerPropertiesProtocol? { get set }
}


// 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
// RedisListResultProtocol is the response of list Redis operation.
public protocol RedisListResultProtocol : Codable {
     var value: [RedisResourceProtocol?]? { get set }
     var _nextLink: String? { get set }
}


// 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
// RedisPatchScheduleProtocol is response to put/get patch schedules for Redis cache.
public protocol RedisPatchScheduleProtocol : ProxyResourceProtocol {
     var properties: ScheduleEntriesProtocol { get set }
}


// 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
// RedisPropertiesProtocol is properties of the redis cache.
public protocol RedisPropertiesProtocol : RedisCreatePropertiesProtocol {
     var redisVersion: String? { get set }
     var provisioningState: String? { get set }
     var hostName: String? { get set }
     var port: Int32? { get set }
     var sslPort: Int32? { get set }
     var accessKeys: RedisAccessKeysProtocol? { get set }
     var linkedServers: [RedisLinkedServerProtocol?]? { get set }
}


// 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
// RedisRebootParametersProtocol is specifies which Redis node(s) to reboot.
public protocol RedisRebootParametersProtocol : Codable {
     var rebootType: RebootTypeEnum { get set }
     var shardId: Int32? { get set }
}


// 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
// RedisRegenerateKeyParametersProtocol is specifies which Redis access keys to reset.
public protocol RedisRegenerateKeyParametersProtocol : Codable {
     var keyType: RedisKeyTypeEnum { get set }
}


// 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
// RedisResourceProtocol is a single Redis item in List or Get Operation.
public protocol RedisResourceProtocol : TrackedResourceProtocol {
     var properties: RedisPropertiesProtocol { get set }
     var zones: [String]? { get set }
}


// 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
// RedisUpdateParametersProtocol is parameters supplied to the Update Redis operation.
public protocol RedisUpdateParametersProtocol : Codable {
     var properties: RedisUpdatePropertiesProtocol? { get set }
     var tags: [String:String]? { get set }
}


// 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
// RedisUpdatePropertiesProtocol is patchable properties of the redis cache.
public protocol RedisUpdatePropertiesProtocol : RedisCommonPropertiesProtocol {
     var sku: SkuProtocol? { get set }
}


// 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
// ResourceProtocol is the Resource definition.
public protocol ResourceProtocol : Codable {
     var id: String? { get set }
     var name: String? { get set }
     var type: String? { get set }
}


// 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
// ScheduleEntriesProtocol is list of patch schedules for a Redis cache.
public protocol ScheduleEntriesProtocol : Codable {
     var scheduleEntries: [ScheduleEntryProtocol] { get set }
}


// 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
// ScheduleEntryProtocol is patch schedule entry for a Premium Redis Cache.
public protocol ScheduleEntryProtocol : Codable {
     var dayOfWeek: DayOfWeekEnum { get set }
     var startHourUtc: Int32 { get set }
     var maintenanceWindow: String? { get set }
}


// 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
// SkuProtocol is SKU parameters supplied to the create Redis operation.
public protocol SkuProtocol : Codable {
     var name: SkuNameEnum { get set }
     var family: SkuFamilyEnum { get set }
     var capacity: Int32 { get set }
}


// 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
// TrackedResourceProtocol is the resource model definition for a ARM tracked top level resource
public protocol TrackedResourceProtocol : ResourceProtocol {
     var tags: [String:String]? { get set }
     var location: String { get set }
}


// 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
// UpgradeNotificationProtocol is properties of upgrade notification.
public protocol UpgradeNotificationProtocol : Codable {
     var name: String? { get set }
     var timestamp: Date? { get set }
     var upsellNotification: [String:String]? { get set }
}


// swift-tools-version:4.0
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let package = Package(
    name: "relay",
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "relay",
            targets: ["relay"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(url: "https://github.com/Alamofire/Alamofire.git", from: "4.0.10"),
        .package(url: "https://github.com/ReactiveX/RxSwift.git", from: "3.4.2"),
        .package(url: "https://github.com/SwiftyJSON/SwiftyJSON.git", from: "3.1.4"),
        .package(url: "git@github.com:alvadb/autorest-clientruntime-for-swift.git", .branch("master"))
    ],
    targets: [
        // Targets are the basic building blocks of a package. A target can define a module or a test suite.
        // Targets can depend on other targets in this package, and on products in packages which this package depends on.
        .target(
            name: "relay",
            dependencies: ["Alamofire", "RxSwift", "SwiftyJSON", "azureSwiftRuntime"])
    ]
)


// 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 class DataFactory {
}
public class Commands {
}


// 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.

// HybridConnections is the use these API to manage Azure Relay resources through Azure Resource Manager.
import Foundation
import azureSwiftRuntime
extension Commands {
public struct HybridConnections {
    public static func CreateOrUpdate(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, subscriptionId: String, parameters: HybridConnectionProtocol) -> HybridConnectionsCreateOrUpdate {
        return CreateOrUpdateCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func CreateOrUpdateAuthorizationRule(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, authorizationRuleName: String, subscriptionId: String, parameters: AuthorizationRuleProtocol) -> HybridConnectionsCreateOrUpdateAuthorizationRule {
        return CreateOrUpdateAuthorizationRuleCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, authorizationRuleName: authorizationRuleName, subscriptionId: subscriptionId, parameters: parameters)
    }
    public static func Delete(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, subscriptionId: String) -> HybridConnectionsDelete {
        return DeleteCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, subscriptionId: subscriptionId)
    }
    public static func DeleteAuthorizationRule(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, authorizationRuleName: String, subscriptionId: String) -> HybridConnectionsDeleteAuthorizationRule {
        return DeleteAuthorizationRuleCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, authorizationRuleName: authorizationRuleName, subscriptionId: subscriptionId)
    }
    public static func Get(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, subscriptionId: String) -> HybridConnectionsGet {
        return GetCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, subscriptionId: subscriptionId)
    }
    public static func GetAuthorizationRule(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, authorizationRuleName: String, subscriptionId: String) -> HybridConnectionsGetAuthorizationRule {
        return GetAuthorizationRuleCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, authorizationRuleName: authorizationRuleName, subscriptionId: subscriptionId)
    }
    public static func ListAuthorizationRules(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, subscriptionId: String) -> HybridConnectionsListAuthorizationRules {
        return ListAuthorizationRulesCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, subscriptionId: subscriptionId)
    }
    public static func ListByNamespace(resourceGroupName: String, namespaceName: String, subscriptionId: String) -> HybridConnectionsListByNamespace {
        return ListByNamespaceCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, subscriptionId: subscriptionId)
    }
    public static func ListKeys(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, authorizationRuleName: String, subscriptionId: String) -> HybridConnectionsListKeys {
        return ListKeysCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, authorizationRuleName: authorizationRuleName, subscriptionId: subscriptionId)
    }
    public static func RegenerateKeys(resourceGroupName: String, namespaceName: String, hybridConnectionName: String, authorizationRuleName: String, subscriptionId: String, parameters: RegenerateAccessKeyParametersProtocol) -> HybridConnectionsRegenerateKeys {
        return RegenerateKeysCommand(resourceGroupName: resourceGroupName, namespaceName: namespaceName, hybridConnectionName: hybridConnectionName, authorizationRuleName: authorizationRuleName, subscriptionId: subscriptionId, parameters: parameters)
    }
}
}