import Foundation
import azureSwiftRuntime
public protocol TrustedIdProvidersListByAccount  {
    var nextLink: String? { get }
    var hasAdditionalPages : Bool { get }
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var accountName : String { get set }
    var apiVersion : String { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (TrustedIdProviderListResultProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.TrustedIdProviders {
// ListByAccount lists the Data Lake Store trusted identity providers within the specified Data Lake Store account.
    internal class ListByAccountCommand : BaseCommand, TrustedIdProvidersListByAccount {
        var nextLink: String?
        public var hasAdditionalPages : Bool {
        get {
            return nextLink != nil
        }
    }
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var apiVersion = "2016-11-01"

        public init(subscriptionId: String, resourceGroupName: String, accountName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            super.init()
            self.method = "Get"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{accountName}"] = String(describing: self.accountName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)

        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                if var pageDecoder = decoder as? PageDecoder {
                    pageDecoder.isPagedData = true
                    pageDecoder.nextLinkName = "NextLink"
                }
                let result = try decoder.decode(TrustedIdProviderListResultData?.self, from: data)
                if var pageDecoder = decoder as? PageDecoder {
                    self.nextLink = pageDecoder.nextLink
                }
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (TrustedIdProviderListResultProtocol?, Error?) -> Void) -> Void {
            if self.nextLink != nil {
                self.path = nextLink!
                self.nextLink = nil;
                self.pathType = .absolute
            }
            client.executeAsync(command: self) {
                (result: TrustedIdProviderListResultData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


import Foundation
import azureSwiftRuntime
public protocol TrustedIdProvidersUpdate  {
    var headerParameters: [String: String] { get set }
    var subscriptionId : String { get set }
    var resourceGroupName : String { get set }
    var accountName : String { get set }
    var trustedIdProviderName : String { get set }
    var apiVersion : String { get set }
    var parameters :  UpdateTrustedIdProviderParametersProtocol?  { get set }
    func execute(client: RuntimeClient,
    completionHandler: @escaping (TrustedIdProviderProtocol?, Error?) -> Void) -> Void ;
}

extension Commands.TrustedIdProviders {
// Update updates the specified trusted identity provider.
    internal class UpdateCommand : BaseCommand, TrustedIdProvidersUpdate {
        public var subscriptionId : String
        public var resourceGroupName : String
        public var accountName : String
        public var trustedIdProviderName : String
        public var apiVersion = "2016-11-01"
    public var parameters :  UpdateTrustedIdProviderParametersProtocol?

        public init(subscriptionId: String, resourceGroupName: String, accountName: String, trustedIdProviderName: String) {
            self.subscriptionId = subscriptionId
            self.resourceGroupName = resourceGroupName
            self.accountName = accountName
            self.trustedIdProviderName = trustedIdProviderName
            super.init()
            self.method = "Patch"
            self.isLongRunningOperation = false
            self.path = "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.DataLakeStore/accounts/{accountName}/trustedIdProviders/{trustedIdProviderName}"
            self.headerParameters = ["Content-Type":"application/json; charset=utf-8"]
        }

        public override func preCall()  {
            self.pathParameters["{subscriptionId}"] = String(describing: self.subscriptionId)
            self.pathParameters["{resourceGroupName}"] = String(describing: self.resourceGroupName)
            self.pathParameters["{accountName}"] = String(describing: self.accountName)
            self.pathParameters["{trustedIdProviderName}"] = String(describing: self.trustedIdProviderName)
            self.queryParameters["api-version"] = String(describing: self.apiVersion)
            self.body = parameters

        }
        public override func encodeBody() throws -> Data? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let encoder = try CoderFactory.encoder(for: mimeType)
                let encodedValue = try encoder.encode(parameters as? UpdateTrustedIdProviderParametersData?)
                return encodedValue
            }
            throw DecodeError.unknownMimeType
        }

        public override func returnFunc(data: Data) throws -> Decodable? {
            let contentType = "application/json"
            if let mimeType = MimeType.getType(forStr: contentType) {
                let decoder = try CoderFactory.decoder(for: mimeType)
                let result = try decoder.decode(TrustedIdProviderData?.self, from: data)
                return result;
            }
            throw DecodeError.unknownMimeType
        }
        public func execute(client: RuntimeClient,
            completionHandler: @escaping (TrustedIdProviderProtocol?, Error?) -> Void) -> Void {
            client.executeAsync(command: self) {
                (result: TrustedIdProviderData?, error: Error?) in
                completionHandler(result, error)
            }
        }
    }
}


// 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 CapabilityInformationData : CapabilityInformationProtocol {
    public var subscriptionId: String?
    public var state: SubscriptionStateEnum?
    public var maxAccountCount: Int32?
    public var accountCount: Int32?
    public var migrationState: Bool?

        enum CodingKeys: String, CodingKey {case subscriptionId = "subscriptionId"
        case state = "state"
        case maxAccountCount = "maxAccountCount"
        case accountCount = "accountCount"
        case migrationState = "migrationState"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createCapabilityInformationProtocol() -> CapabilityInformationProtocol {
    return CapabilityInformationData()
  }
}


// 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 CheckNameAvailabilityParametersData : CheckNameAvailabilityParametersProtocol {
    public var name: String
    public var type: String

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

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

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

extension DataFactory {
  public static func createCheckNameAvailabilityParametersProtocol(name: String, type: String) -> CheckNameAvailabilityParametersProtocol {
    return CheckNameAvailabilityParametersData(name: name, type: 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.
import Foundation
import azureSwiftRuntime
internal struct CreateDataLakeStoreAccountParametersData : CreateDataLakeStoreAccountParametersProtocol {
    public var location: String
    public var tags: [String:String]?
    public var identity: EncryptionIdentityProtocol?
    public var properties: CreateDataLakeStoreAccountPropertiesProtocol?

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

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

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

extension DataFactory {
  public static func createCreateDataLakeStoreAccountParametersProtocol(location: String) -> CreateDataLakeStoreAccountParametersProtocol {
    return CreateDataLakeStoreAccountParametersData(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 CreateDataLakeStoreAccountPropertiesData : CreateDataLakeStoreAccountPropertiesProtocol {
    public var defaultGroup: String?
    public var encryptionConfig: EncryptionConfigProtocol?
    public var encryptionState: EncryptionStateEnum?
    public var firewallRules: [CreateFirewallRuleWithAccountParametersProtocol?]?
    public var firewallState: FirewallStateEnum?
    public var firewallAllowAzureIps: FirewallAllowAzureIpsStateEnum?
    public var trustedIdProviders: [CreateTrustedIdProviderWithAccountParametersProtocol?]?
    public var trustedIdProviderState: TrustedIdProviderStateEnum?
    public var newTier: TierTypeEnum?

        enum CodingKeys: String, CodingKey {case defaultGroup = "defaultGroup"
        case encryptionConfig = "encryptionConfig"
        case encryptionState = "encryptionState"
        case firewallRules = "firewallRules"
        case firewallState = "firewallState"
        case firewallAllowAzureIps = "firewallAllowAzureIps"
        case trustedIdProviders = "trustedIdProviders"
        case trustedIdProviderState = "trustedIdProviderState"
        case newTier = "newTier"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.defaultGroup) {
        self.defaultGroup = try container.decode(String?.self, forKey: .defaultGroup)
    }
    if container.contains(.encryptionConfig) {
        self.encryptionConfig = try container.decode(EncryptionConfigData?.self, forKey: .encryptionConfig)
    }
    if container.contains(.encryptionState) {
        self.encryptionState = try container.decode(EncryptionStateEnum?.self, forKey: .encryptionState)
    }
    if container.contains(.firewallRules) {
        self.firewallRules = try container.decode([CreateFirewallRuleWithAccountParametersData?]?.self, forKey: .firewallRules)
    }
    if container.contains(.firewallState) {
        self.firewallState = try container.decode(FirewallStateEnum?.self, forKey: .firewallState)
    }
    if container.contains(.firewallAllowAzureIps) {
        self.firewallAllowAzureIps = try container.decode(FirewallAllowAzureIpsStateEnum?.self, forKey: .firewallAllowAzureIps)
    }
    if container.contains(.trustedIdProviders) {
        self.trustedIdProviders = try container.decode([CreateTrustedIdProviderWithAccountParametersData?]?.self, forKey: .trustedIdProviders)
    }
    if container.contains(.trustedIdProviderState) {
        self.trustedIdProviderState = try container.decode(TrustedIdProviderStateEnum?.self, forKey: .trustedIdProviderState)
    }
    if container.contains(.newTier) {
        self.newTier = try container.decode(TierTypeEnum?.self, forKey: .newTier)
    }
    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.defaultGroup != nil {try container.encode(self.defaultGroup, forKey: .defaultGroup)}
    if self.encryptionConfig != nil {try container.encode(self.encryptionConfig as! EncryptionConfigData?, forKey: .encryptionConfig)}
    if self.encryptionState != nil {try container.encode(self.encryptionState, forKey: .encryptionState)}
    if self.firewallRules != nil {try container.encode(self.firewallRules as! [CreateFirewallRuleWithAccountParametersData?]?, forKey: .firewallRules)}
    if self.firewallState != nil {try container.encode(self.firewallState, forKey: .firewallState)}
    if self.firewallAllowAzureIps != nil {try container.encode(self.firewallAllowAzureIps, forKey: .firewallAllowAzureIps)}
    if self.trustedIdProviders != nil {try container.encode(self.trustedIdProviders as! [CreateTrustedIdProviderWithAccountParametersData?]?, forKey: .trustedIdProviders)}
    if self.trustedIdProviderState != nil {try container.encode(self.trustedIdProviderState, forKey: .trustedIdProviderState)}
    if self.newTier != nil {try container.encode(self.newTier, forKey: .newTier)}
  }
}

extension DataFactory {
  public static func createCreateDataLakeStoreAccountPropertiesProtocol() -> CreateDataLakeStoreAccountPropertiesProtocol {
    return CreateDataLakeStoreAccountPropertiesData()
  }
}


// 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 CreateFirewallRuleWithAccountParametersData : CreateFirewallRuleWithAccountParametersProtocol {
    public var name: String
    public var properties: CreateOrUpdateFirewallRulePropertiesProtocol

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

  public init(name: String, properties: CreateOrUpdateFirewallRulePropertiesProtocol)  {
    self.name = name
    self.properties = properties
  }

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

extension DataFactory {
  public static func createCreateFirewallRuleWithAccountParametersProtocol(name: String, properties: CreateOrUpdateFirewallRulePropertiesProtocol) -> CreateFirewallRuleWithAccountParametersProtocol {
    return CreateFirewallRuleWithAccountParametersData(name: name, 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 CreateOrUpdateFirewallRuleParametersData : CreateOrUpdateFirewallRuleParametersProtocol {
    public var properties: CreateOrUpdateFirewallRulePropertiesProtocol

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

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

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

extension DataFactory {
  public static func createCreateOrUpdateFirewallRuleParametersProtocol(properties: CreateOrUpdateFirewallRulePropertiesProtocol) -> CreateOrUpdateFirewallRuleParametersProtocol {
    return CreateOrUpdateFirewallRuleParametersData(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 CreateOrUpdateFirewallRulePropertiesData : CreateOrUpdateFirewallRulePropertiesProtocol {
    public var startIpAddress: String
    public var endIpAddress: String

        enum CodingKeys: String, CodingKey {case startIpAddress = "startIpAddress"
        case endIpAddress = "endIpAddress"
        }

  public init(startIpAddress: String, endIpAddress: String)  {
    self.startIpAddress = startIpAddress
    self.endIpAddress = endIpAddress
  }

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

extension DataFactory {
  public static func createCreateOrUpdateFirewallRulePropertiesProtocol(startIpAddress: String, endIpAddress: String) -> CreateOrUpdateFirewallRulePropertiesProtocol {
    return CreateOrUpdateFirewallRulePropertiesData(startIpAddress: startIpAddress, endIpAddress: endIpAddress)
  }
}


// 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 CreateOrUpdateTrustedIdProviderParametersData : CreateOrUpdateTrustedIdProviderParametersProtocol {
    public var properties: CreateOrUpdateTrustedIdProviderPropertiesProtocol

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

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

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

extension DataFactory {
  public static func createCreateOrUpdateTrustedIdProviderParametersProtocol(properties: CreateOrUpdateTrustedIdProviderPropertiesProtocol) -> CreateOrUpdateTrustedIdProviderParametersProtocol {
    return CreateOrUpdateTrustedIdProviderParametersData(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 CreateOrUpdateTrustedIdProviderPropertiesData : CreateOrUpdateTrustedIdProviderPropertiesProtocol {
    public var idProvider: String

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

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

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

extension DataFactory {
  public static func createCreateOrUpdateTrustedIdProviderPropertiesProtocol(idProvider: String) -> CreateOrUpdateTrustedIdProviderPropertiesProtocol {
    return CreateOrUpdateTrustedIdProviderPropertiesData(idProvider: idProvider)
  }
}


// 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 CreateTrustedIdProviderWithAccountParametersData : CreateTrustedIdProviderWithAccountParametersProtocol {
    public var name: String
    public var properties: CreateOrUpdateTrustedIdProviderPropertiesProtocol

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

  public init(name: String, properties: CreateOrUpdateTrustedIdProviderPropertiesProtocol)  {
    self.name = name
    self.properties = properties
  }

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

extension DataFactory {
  public static func createCreateTrustedIdProviderWithAccountParametersProtocol(name: String, properties: CreateOrUpdateTrustedIdProviderPropertiesProtocol) -> CreateTrustedIdProviderWithAccountParametersProtocol {
    return CreateTrustedIdProviderWithAccountParametersData(name: name, 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 DataLakeStoreAccountBasicData : DataLakeStoreAccountBasicProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var properties: DataLakeStoreAccountPropertiesBasicProtocol?

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

extension DataFactory {
  public static func createDataLakeStoreAccountBasicProtocol() -> DataLakeStoreAccountBasicProtocol {
    return DataLakeStoreAccountBasicData()
  }
}


// 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 DataLakeStoreAccountData : DataLakeStoreAccountProtocol, ResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var location: String?
    public var tags: [String:String]?
    public var identity: EncryptionIdentityProtocol?
    public var properties: DataLakeStoreAccountPropertiesProtocol?

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

extension DataFactory {
  public static func createDataLakeStoreAccountProtocol() -> DataLakeStoreAccountProtocol {
    return DataLakeStoreAccountData()
  }
}


// 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 DataLakeStoreAccountListResultData : DataLakeStoreAccountListResultProtocol {
    public var value: [DataLakeStoreAccountBasicProtocol?]?
    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([DataLakeStoreAccountBasicData?]?.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! [DataLakeStoreAccountBasicData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createDataLakeStoreAccountListResultProtocol() -> DataLakeStoreAccountListResultProtocol {
    return DataLakeStoreAccountListResultData()
  }
}


// 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 DataLakeStoreAccountPropertiesBasicData : DataLakeStoreAccountPropertiesBasicProtocol {
    public var accountId: String?
    public var provisioningState: DataLakeStoreAccountStatusEnum?
    public var state: DataLakeStoreAccountStateEnum?
    public var creationTime: Date?
    public var lastModifiedTime: Date?
    public var endpoint: String?

        enum CodingKeys: String, CodingKey {case accountId = "accountId"
        case provisioningState = "provisioningState"
        case state = "state"
        case creationTime = "creationTime"
        case lastModifiedTime = "lastModifiedTime"
        case endpoint = "endpoint"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createDataLakeStoreAccountPropertiesBasicProtocol() -> DataLakeStoreAccountPropertiesBasicProtocol {
    return DataLakeStoreAccountPropertiesBasicData()
  }
}


// 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 DataLakeStoreAccountPropertiesData : DataLakeStoreAccountPropertiesProtocol, DataLakeStoreAccountPropertiesBasicProtocol {
    public var accountId: String?
    public var provisioningState: DataLakeStoreAccountStatusEnum?
    public var state: DataLakeStoreAccountStateEnum?
    public var creationTime: Date?
    public var lastModifiedTime: Date?
    public var endpoint: String?
    public var defaultGroup: String?
    public var encryptionConfig: EncryptionConfigProtocol?
    public var encryptionState: EncryptionStateEnum?
    public var encryptionProvisioningState: EncryptionProvisioningStateEnum?
    public var firewallRules: [FirewallRuleProtocol?]?
    public var firewallState: FirewallStateEnum?
    public var firewallAllowAzureIps: FirewallAllowAzureIpsStateEnum?
    public var trustedIdProviders: [TrustedIdProviderProtocol?]?
    public var trustedIdProviderState: TrustedIdProviderStateEnum?
    public var newTier: TierTypeEnum?
    public var currentTier: TierTypeEnum?

        enum CodingKeys: String, CodingKey {case accountId = "accountId"
        case provisioningState = "provisioningState"
        case state = "state"
        case creationTime = "creationTime"
        case lastModifiedTime = "lastModifiedTime"
        case endpoint = "endpoint"
        case defaultGroup = "defaultGroup"
        case encryptionConfig = "encryptionConfig"
        case encryptionState = "encryptionState"
        case encryptionProvisioningState = "encryptionProvisioningState"
        case firewallRules = "firewallRules"
        case firewallState = "firewallState"
        case firewallAllowAzureIps = "firewallAllowAzureIps"
        case trustedIdProviders = "trustedIdProviders"
        case trustedIdProviderState = "trustedIdProviderState"
        case newTier = "newTier"
        case currentTier = "currentTier"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.accountId) {
        self.accountId = try container.decode(String?.self, forKey: .accountId)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(DataLakeStoreAccountStatusEnum?.self, forKey: .provisioningState)
    }
    if container.contains(.state) {
        self.state = try container.decode(DataLakeStoreAccountStateEnum?.self, forKey: .state)
    }
    if container.contains(.creationTime) {
        self.creationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .creationTime)), format: .dateTime)
    }
    if container.contains(.lastModifiedTime) {
        self.lastModifiedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastModifiedTime)), format: .dateTime)
    }
    if container.contains(.endpoint) {
        self.endpoint = try container.decode(String?.self, forKey: .endpoint)
    }
    if container.contains(.defaultGroup) {
        self.defaultGroup = try container.decode(String?.self, forKey: .defaultGroup)
    }
    if container.contains(.encryptionConfig) {
        self.encryptionConfig = try container.decode(EncryptionConfigData?.self, forKey: .encryptionConfig)
    }
    if container.contains(.encryptionState) {
        self.encryptionState = try container.decode(EncryptionStateEnum?.self, forKey: .encryptionState)
    }
    if container.contains(.encryptionProvisioningState) {
        self.encryptionProvisioningState = try container.decode(EncryptionProvisioningStateEnum?.self, forKey: .encryptionProvisioningState)
    }
    if container.contains(.firewallRules) {
        self.firewallRules = try container.decode([FirewallRuleData?]?.self, forKey: .firewallRules)
    }
    if container.contains(.firewallState) {
        self.firewallState = try container.decode(FirewallStateEnum?.self, forKey: .firewallState)
    }
    if container.contains(.firewallAllowAzureIps) {
        self.firewallAllowAzureIps = try container.decode(FirewallAllowAzureIpsStateEnum?.self, forKey: .firewallAllowAzureIps)
    }
    if container.contains(.trustedIdProviders) {
        self.trustedIdProviders = try container.decode([TrustedIdProviderData?]?.self, forKey: .trustedIdProviders)
    }
    if container.contains(.trustedIdProviderState) {
        self.trustedIdProviderState = try container.decode(TrustedIdProviderStateEnum?.self, forKey: .trustedIdProviderState)
    }
    if container.contains(.newTier) {
        self.newTier = try container.decode(TierTypeEnum?.self, forKey: .newTier)
    }
    if container.contains(.currentTier) {
        self.currentTier = try container.decode(TierTypeEnum?.self, forKey: .currentTier)
    }
    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.accountId != nil {try container.encode(self.accountId, forKey: .accountId)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.state != nil {try container.encode(self.state, forKey: .state)}
    if self.creationTime != nil {
        try container.encode(DateConverter.toString(date: self.creationTime!, format: .dateTime), forKey: .creationTime)
    }
    if self.lastModifiedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastModifiedTime!, format: .dateTime), forKey: .lastModifiedTime)
    }
    if self.endpoint != nil {try container.encode(self.endpoint, forKey: .endpoint)}
    if self.defaultGroup != nil {try container.encode(self.defaultGroup, forKey: .defaultGroup)}
    if self.encryptionConfig != nil {try container.encode(self.encryptionConfig as! EncryptionConfigData?, forKey: .encryptionConfig)}
    if self.encryptionState != nil {try container.encode(self.encryptionState, forKey: .encryptionState)}
    if self.encryptionProvisioningState != nil {try container.encode(self.encryptionProvisioningState, forKey: .encryptionProvisioningState)}
    if self.firewallRules != nil {try container.encode(self.firewallRules as! [FirewallRuleData?]?, forKey: .firewallRules)}
    if self.firewallState != nil {try container.encode(self.firewallState, forKey: .firewallState)}
    if self.firewallAllowAzureIps != nil {try container.encode(self.firewallAllowAzureIps, forKey: .firewallAllowAzureIps)}
    if self.trustedIdProviders != nil {try container.encode(self.trustedIdProviders as! [TrustedIdProviderData?]?, forKey: .trustedIdProviders)}
    if self.trustedIdProviderState != nil {try container.encode(self.trustedIdProviderState, forKey: .trustedIdProviderState)}
    if self.newTier != nil {try container.encode(self.newTier, forKey: .newTier)}
    if self.currentTier != nil {try container.encode(self.currentTier, forKey: .currentTier)}
  }
}

extension DataFactory {
  public static func createDataLakeStoreAccountPropertiesProtocol() -> DataLakeStoreAccountPropertiesProtocol {
    return DataLakeStoreAccountPropertiesData()
  }
}


// DataLakeStoreAccountState enumerates the values for data lake store account state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum DataLakeStoreAccountStateEnum: String, Codable
{
// Active specifies the active state for data lake store account state.
    case Active = "Active"
// Suspended specifies the suspended state for data lake store account state.
    case Suspended = "Suspended"
}


// DataLakeStoreAccountStatus enumerates the values for data lake store account status.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum DataLakeStoreAccountStatusEnum: String, Codable
{
// Canceled specifies the canceled state for data lake store account status.
    case Canceled = "Canceled"
// Creating specifies the creating state for data lake store account status.
    case Creating = "Creating"
// Deleted specifies the deleted state for data lake store account status.
    case Deleted = "Deleted"
// Deleting specifies the deleting state for data lake store account status.
    case Deleting = "Deleting"
// Failed specifies the failed state for data lake store account status.
    case Failed = "Failed"
// Patching specifies the patching state for data lake store account status.
    case Patching = "Patching"
// Resuming specifies the resuming state for data lake store account status.
    case Resuming = "Resuming"
// Running specifies the running state for data lake store account status.
    case Running = "Running"
// Succeeded specifies the succeeded state for data lake store account status.
    case Succeeded = "Succeeded"
// Suspending specifies the suspending state for data lake store account status.
    case Suspending = "Suspending"
// Undeleting specifies the undeleting state for data lake store account status.
    case Undeleting = "Undeleting"
}


// 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 EncryptionConfigData : EncryptionConfigProtocol {
    public var type: EncryptionConfigTypeEnum
    public var keyVaultMetaInfo: KeyVaultMetaInfoProtocol?

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

  public init(type: EncryptionConfigTypeEnum)  {
    self.type = type
  }

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

extension DataFactory {
  public static func createEncryptionConfigProtocol(type: EncryptionConfigTypeEnum) -> EncryptionConfigProtocol {
    return EncryptionConfigData(type: type)
  }
}


// EncryptionConfigType enumerates the values for encryption config 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 EncryptionConfigTypeEnum: String, Codable
{
// ServiceManaged specifies the service managed state for encryption config type.
    case ServiceManaged = "ServiceManaged"
// UserManaged specifies the user managed state for encryption config type.
    case UserManaged = "UserManaged"
}


// 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 EncryptionIdentityData : EncryptionIdentityProtocol {
    public var type: String
    public var principalId: String?
    public var tenantId: String?

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

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

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

extension DataFactory {
  public static func createEncryptionIdentityProtocol(type: String) -> EncryptionIdentityProtocol {
    return EncryptionIdentityData(type: type)
  }
}


// EncryptionProvisioningState enumerates the values for encryption provisioning state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum EncryptionProvisioningStateEnum: String, Codable
{
// EncryptionProvisioningStateCreating specifies the encryption provisioning state creating state for encryption
// provisioning state.
    case EncryptionProvisioningStateCreating = "Creating"
// EncryptionProvisioningStateSucceeded specifies the encryption provisioning state succeeded state for encryption
// provisioning state.
    case EncryptionProvisioningStateSucceeded = "Succeeded"
}


// EncryptionState enumerates the values for encryption state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum EncryptionStateEnum: String, Codable
{
// Disabled specifies the disabled state for encryption state.
    case Disabled = "Disabled"
// Enabled specifies the enabled state for encryption state.
    case Enabled = "Enabled"
}


// FirewallAllowAzureIpsState enumerates the values for firewall allow azure ips state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum FirewallAllowAzureIpsStateEnum: String, Codable
{
// FirewallAllowAzureIpsStateDisabled specifies the firewall allow azure ips state disabled state for firewall allow
// azure ips state.
    case FirewallAllowAzureIpsStateDisabled = "Disabled"
// FirewallAllowAzureIpsStateEnabled specifies the firewall allow azure ips state enabled state for firewall allow
// azure ips state.
    case FirewallAllowAzureIpsStateEnabled = "Enabled"
}


// 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 FirewallRuleData : FirewallRuleProtocol, SubResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: FirewallRulePropertiesProtocol?

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

extension DataFactory {
  public static func createFirewallRuleProtocol() -> FirewallRuleProtocol {
    return FirewallRuleData()
  }
}


// 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 FirewallRuleListResultData : FirewallRuleListResultProtocol {
    public var value: [FirewallRuleProtocol?]?
    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([FirewallRuleData?]?.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! [FirewallRuleData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createFirewallRuleListResultProtocol() -> FirewallRuleListResultProtocol {
    return FirewallRuleListResultData()
  }
}


// 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 FirewallRulePropertiesData : FirewallRulePropertiesProtocol {
    public var startIpAddress: String?
    public var endIpAddress: String?

        enum CodingKeys: String, CodingKey {case startIpAddress = "startIpAddress"
        case endIpAddress = "endIpAddress"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createFirewallRulePropertiesProtocol() -> FirewallRulePropertiesProtocol {
    return FirewallRulePropertiesData()
  }
}


// FirewallState enumerates the values for firewall state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum FirewallStateEnum: String, Codable
{
// FirewallStateDisabled specifies the firewall state disabled state for firewall state.
    case FirewallStateDisabled = "Disabled"
// FirewallStateEnabled specifies the firewall state enabled state for firewall state.
    case FirewallStateEnabled = "Enabled"
}


// 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 KeyVaultMetaInfoData : KeyVaultMetaInfoProtocol {
    public var keyVaultResourceId: String
    public var encryptionKeyName: String
    public var encryptionKeyVersion: String

        enum CodingKeys: String, CodingKey {case keyVaultResourceId = "keyVaultResourceId"
        case encryptionKeyName = "encryptionKeyName"
        case encryptionKeyVersion = "encryptionKeyVersion"
        }

  public init(keyVaultResourceId: String, encryptionKeyName: String, encryptionKeyVersion: String)  {
    self.keyVaultResourceId = keyVaultResourceId
    self.encryptionKeyName = encryptionKeyName
    self.encryptionKeyVersion = encryptionKeyVersion
  }

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

extension DataFactory {
  public static func createKeyVaultMetaInfoProtocol(keyVaultResourceId: String, encryptionKeyName: String, encryptionKeyVersion: String) -> KeyVaultMetaInfoProtocol {
    return KeyVaultMetaInfoData(keyVaultResourceId: keyVaultResourceId, encryptionKeyName: encryptionKeyName, encryptionKeyVersion: encryptionKeyVersion)
  }
}


// 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 NameAvailabilityInformationData : NameAvailabilityInformationProtocol {
    public var nameAvailable: Bool?
    public var reason: String?
    public var message: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createNameAvailabilityInformationProtocol() -> NameAvailabilityInformationProtocol {
    return NameAvailabilityInformationData()
  }
}


// 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?
    public var origin: OperationOriginEnum?

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

  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 container.contains(.origin) {
        self.origin = try container.decode(OperationOriginEnum?.self, forKey: .origin)
    }
    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)}
    if self.origin != nil {try container.encode(self.origin, forKey: .origin)}
  }
}

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 resource: String?
    public var operation: String?
    public var description: String?

        enum CodingKeys: String, CodingKey {case provider = "provider"
        case resource = "resource"
        case operation = "operation"
        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(.resource) {
        self.resource = try container.decode(String?.self, forKey: .resource)
    }
    if container.contains(.operation) {
        self.operation = try container.decode(String?.self, forKey: .operation)
    }
    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.resource != nil {try container.encode(self.resource, forKey: .resource)}
    if self.operation != nil {try container.encode(self.operation, forKey: .operation)}
    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()
  }
}


// OperationOrigin enumerates the values for operation origin.

// 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 OperationOriginEnum: String, Codable
{
// System specifies the system state for operation origin.
    case System = "system"
// User specifies the user state for operation origin.
    case User = "user"
// Usersystem specifies the usersystem state for operation origin.
    case Usersystem = "user,system"
}


// 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?
    public var location: String?
    public var tags: [String:String]?

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

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

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 SubResourceData : SubResourceProtocol {
    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 createSubResourceProtocol() -> SubResourceProtocol {
    return SubResourceData()
  }
}


// SubscriptionState enumerates the values for subscription state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum SubscriptionStateEnum: String, Codable
{
// SubscriptionStateDeleted specifies the subscription state deleted state for subscription state.
    case SubscriptionStateDeleted = "Deleted"
// SubscriptionStateRegistered specifies the subscription state registered state for subscription state.
    case SubscriptionStateRegistered = "Registered"
// SubscriptionStateSuspended specifies the subscription state suspended state for subscription state.
    case SubscriptionStateSuspended = "Suspended"
// SubscriptionStateUnregistered specifies the subscription state unregistered state for subscription state.
    case SubscriptionStateUnregistered = "Unregistered"
// SubscriptionStateWarned specifies the subscription state warned state for subscription state.
    case SubscriptionStateWarned = "Warned"
}


// TierType enumerates the values for tier 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 TierTypeEnum: String, Codable
{
// Commitment100TB specifies the commitment 100tb state for tier type.
    case Commitment100TB = "Commitment_100TB"
// Commitment10TB specifies the commitment 10tb state for tier type.
    case Commitment10TB = "Commitment_10TB"
// Commitment1PB specifies the commitment 1pb state for tier type.
    case Commitment1PB = "Commitment_1PB"
// Commitment1TB specifies the commitment 1tb state for tier type.
    case Commitment1TB = "Commitment_1TB"
// Commitment500TB specifies the commitment 500tb state for tier type.
    case Commitment500TB = "Commitment_500TB"
// Commitment5PB specifies the commitment 5pb state for tier type.
    case Commitment5PB = "Commitment_5PB"
// Consumption specifies the consumption state for tier type.
    case Consumption = "Consumption"
}


// 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 TrustedIdProviderData : TrustedIdProviderProtocol, SubResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: TrustedIdProviderPropertiesProtocol?

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

extension DataFactory {
  public static func createTrustedIdProviderProtocol() -> TrustedIdProviderProtocol {
    return TrustedIdProviderData()
  }
}


// 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 TrustedIdProviderListResultData : TrustedIdProviderListResultProtocol {
    public var value: [TrustedIdProviderProtocol?]?
    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([TrustedIdProviderData?]?.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! [TrustedIdProviderData?]?, forKey: .value)}
    if self._nextLink != nil {try container.encode(self._nextLink, forKey: ._nextLink)}
  }
}

extension DataFactory {
  public static func createTrustedIdProviderListResultProtocol() -> TrustedIdProviderListResultProtocol {
    return TrustedIdProviderListResultData()
  }
}


// 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 TrustedIdProviderPropertiesData : TrustedIdProviderPropertiesProtocol {
    public var idProvider: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createTrustedIdProviderPropertiesProtocol() -> TrustedIdProviderPropertiesProtocol {
    return TrustedIdProviderPropertiesData()
  }
}


// TrustedIdProviderState enumerates the values for trusted id provider state.

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
public enum TrustedIdProviderStateEnum: String, Codable
{
// TrustedIdProviderStateDisabled specifies the trusted id provider state disabled state for trusted id provider state.
    case TrustedIdProviderStateDisabled = "Disabled"
// TrustedIdProviderStateEnabled specifies the trusted id provider state enabled state for trusted id provider state.
    case TrustedIdProviderStateEnabled = "Enabled"
}


// 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 UpdateDataLakeStoreAccountParametersData : UpdateDataLakeStoreAccountParametersProtocol {
    public var tags: [String:String]?
    public var properties: UpdateDataLakeStoreAccountPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateDataLakeStoreAccountParametersProtocol() -> UpdateDataLakeStoreAccountParametersProtocol {
    return UpdateDataLakeStoreAccountParametersData()
  }
}


// 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 UpdateDataLakeStoreAccountPropertiesData : UpdateDataLakeStoreAccountPropertiesProtocol {
    public var defaultGroup: String?
    public var encryptionConfig: UpdateEncryptionConfigProtocol?
    public var firewallRules: [UpdateFirewallRuleWithAccountParametersProtocol?]?
    public var firewallState: FirewallStateEnum?
    public var firewallAllowAzureIps: FirewallAllowAzureIpsStateEnum?
    public var trustedIdProviders: [UpdateTrustedIdProviderWithAccountParametersProtocol?]?
    public var trustedIdProviderState: TrustedIdProviderStateEnum?
    public var newTier: TierTypeEnum?

        enum CodingKeys: String, CodingKey {case defaultGroup = "defaultGroup"
        case encryptionConfig = "encryptionConfig"
        case firewallRules = "firewallRules"
        case firewallState = "firewallState"
        case firewallAllowAzureIps = "firewallAllowAzureIps"
        case trustedIdProviders = "trustedIdProviders"
        case trustedIdProviderState = "trustedIdProviderState"
        case newTier = "newTier"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.defaultGroup) {
        self.defaultGroup = try container.decode(String?.self, forKey: .defaultGroup)
    }
    if container.contains(.encryptionConfig) {
        self.encryptionConfig = try container.decode(UpdateEncryptionConfigData?.self, forKey: .encryptionConfig)
    }
    if container.contains(.firewallRules) {
        self.firewallRules = try container.decode([UpdateFirewallRuleWithAccountParametersData?]?.self, forKey: .firewallRules)
    }
    if container.contains(.firewallState) {
        self.firewallState = try container.decode(FirewallStateEnum?.self, forKey: .firewallState)
    }
    if container.contains(.firewallAllowAzureIps) {
        self.firewallAllowAzureIps = try container.decode(FirewallAllowAzureIpsStateEnum?.self, forKey: .firewallAllowAzureIps)
    }
    if container.contains(.trustedIdProviders) {
        self.trustedIdProviders = try container.decode([UpdateTrustedIdProviderWithAccountParametersData?]?.self, forKey: .trustedIdProviders)
    }
    if container.contains(.trustedIdProviderState) {
        self.trustedIdProviderState = try container.decode(TrustedIdProviderStateEnum?.self, forKey: .trustedIdProviderState)
    }
    if container.contains(.newTier) {
        self.newTier = try container.decode(TierTypeEnum?.self, forKey: .newTier)
    }
    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.defaultGroup != nil {try container.encode(self.defaultGroup, forKey: .defaultGroup)}
    if self.encryptionConfig != nil {try container.encode(self.encryptionConfig as! UpdateEncryptionConfigData?, forKey: .encryptionConfig)}
    if self.firewallRules != nil {try container.encode(self.firewallRules as! [UpdateFirewallRuleWithAccountParametersData?]?, forKey: .firewallRules)}
    if self.firewallState != nil {try container.encode(self.firewallState, forKey: .firewallState)}
    if self.firewallAllowAzureIps != nil {try container.encode(self.firewallAllowAzureIps, forKey: .firewallAllowAzureIps)}
    if self.trustedIdProviders != nil {try container.encode(self.trustedIdProviders as! [UpdateTrustedIdProviderWithAccountParametersData?]?, forKey: .trustedIdProviders)}
    if self.trustedIdProviderState != nil {try container.encode(self.trustedIdProviderState, forKey: .trustedIdProviderState)}
    if self.newTier != nil {try container.encode(self.newTier, forKey: .newTier)}
  }
}

extension DataFactory {
  public static func createUpdateDataLakeStoreAccountPropertiesProtocol() -> UpdateDataLakeStoreAccountPropertiesProtocol {
    return UpdateDataLakeStoreAccountPropertiesData()
  }
}


// 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 UpdateEncryptionConfigData : UpdateEncryptionConfigProtocol {
    public var keyVaultMetaInfo: UpdateKeyVaultMetaInfoProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateEncryptionConfigProtocol() -> UpdateEncryptionConfigProtocol {
    return UpdateEncryptionConfigData()
  }
}


// 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 UpdateFirewallRuleParametersData : UpdateFirewallRuleParametersProtocol {
    public var properties: UpdateFirewallRulePropertiesProtocol?

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

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

extension DataFactory {
  public static func createUpdateFirewallRuleParametersProtocol() -> UpdateFirewallRuleParametersProtocol {
    return UpdateFirewallRuleParametersData()
  }
}


// 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 UpdateFirewallRulePropertiesData : UpdateFirewallRulePropertiesProtocol {
    public var startIpAddress: String?
    public var endIpAddress: String?

        enum CodingKeys: String, CodingKey {case startIpAddress = "startIpAddress"
        case endIpAddress = "endIpAddress"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateFirewallRulePropertiesProtocol() -> UpdateFirewallRulePropertiesProtocol {
    return UpdateFirewallRulePropertiesData()
  }
}


// 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 UpdateFirewallRuleWithAccountParametersData : UpdateFirewallRuleWithAccountParametersProtocol {
    public var name: String
    public var properties: UpdateFirewallRulePropertiesProtocol?

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

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

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

extension DataFactory {
  public static func createUpdateFirewallRuleWithAccountParametersProtocol(name: String) -> UpdateFirewallRuleWithAccountParametersProtocol {
    return UpdateFirewallRuleWithAccountParametersData(name: 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.
import Foundation
import azureSwiftRuntime
internal struct UpdateKeyVaultMetaInfoData : UpdateKeyVaultMetaInfoProtocol {
    public var encryptionKeyVersion: String?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createUpdateKeyVaultMetaInfoProtocol() -> UpdateKeyVaultMetaInfoProtocol {
    return UpdateKeyVaultMetaInfoData()
  }
}