// 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 FieldDefinitionData : FieldDefinitionProtocol {
    public var isEncrypted: Bool?
    public var isOptional: Bool?
    public var type: String

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

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

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

extension DataFactory {
  public static func createFieldDefinitionProtocol(type: String) -> FieldDefinitionProtocol {
    return FieldDefinitionData(type: type)
  }
}


// HttpStatusCode enumerates the values for http status code.

// 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 HttpStatusCodeEnum: String, Codable
{
// Accepted specifies the accepted state for http status code.
    case Accepted = "Accepted"
// Ambiguous specifies the ambiguous state for http status code.
    case Ambiguous = "Ambiguous"
// BadGateway specifies the bad gateway state for http status code.
    case BadGateway = "BadGateway"
// BadRequest specifies the bad request state for http status code.
    case BadRequest = "BadRequest"
// Conflict specifies the conflict state for http status code.
    case Conflict = "Conflict"
// Continue specifies the continue state for http status code.
    case Continue = "Continue"
// Created specifies the created state for http status code.
    case Created = "Created"
// ExpectationFailed specifies the expectation failed state for http status code.
    case ExpectationFailed = "ExpectationFailed"
// Forbidden specifies the forbidden state for http status code.
    case Forbidden = "Forbidden"
// Found specifies the found state for http status code.
    case Found = "Found"
// GatewayTimeout specifies the gateway timeout state for http status code.
    case GatewayTimeout = "GatewayTimeout"
// Gone specifies the gone state for http status code.
    case Gone = "Gone"
// HttpVersionNotSupported specifies the http version not supported state for http status code.
    case HttpVersionNotSupported = "HttpVersionNotSupported"
// InternalServerError specifies the internal server error state for http status code.
    case InternalServerError = "InternalServerError"
// LengthRequired specifies the length required state for http status code.
    case LengthRequired = "LengthRequired"
// MethodNotAllowed specifies the method not allowed state for http status code.
    case MethodNotAllowed = "MethodNotAllowed"
// Moved specifies the moved state for http status code.
    case Moved = "Moved"
// MovedPermanently specifies the moved permanently state for http status code.
    case MovedPermanently = "MovedPermanently"
// MultipleChoices specifies the multiple choices state for http status code.
    case MultipleChoices = "MultipleChoices"
// NoContent specifies the no content state for http status code.
    case NoContent = "NoContent"
// NonAuthoritativeInformation specifies the non authoritative information state for http status code.
    case NonAuthoritativeInformation = "NonAuthoritativeInformation"
// NotAcceptable specifies the not acceptable state for http status code.
    case NotAcceptable = "NotAcceptable"
// NotFound specifies the not found state for http status code.
    case NotFound = "NotFound"
// NotImplemented specifies the not implemented state for http status code.
    case NotImplemented = "NotImplemented"
// NotModified specifies the not modified state for http status code.
    case NotModified = "NotModified"
// OK specifies the ok state for http status code.
    case OK = "OK"
// PartialContent specifies the partial content state for http status code.
    case PartialContent = "PartialContent"
// PaymentRequired specifies the payment required state for http status code.
    case PaymentRequired = "PaymentRequired"
// PreconditionFailed specifies the precondition failed state for http status code.
    case PreconditionFailed = "PreconditionFailed"
// ProxyAuthenticationRequired specifies the proxy authentication required state for http status code.
    case ProxyAuthenticationRequired = "ProxyAuthenticationRequired"
// Redirect specifies the redirect state for http status code.
    case Redirect = "Redirect"
// RedirectKeepVerb specifies the redirect keep verb state for http status code.
    case RedirectKeepVerb = "RedirectKeepVerb"
// RedirectMethod specifies the redirect method state for http status code.
    case RedirectMethod = "RedirectMethod"
// RequestedRangeNotSatisfiable specifies the requested range not satisfiable state for http status code.
    case RequestedRangeNotSatisfiable = "RequestedRangeNotSatisfiable"
// RequestEntityTooLarge specifies the request entity too large state for http status code.
    case RequestEntityTooLarge = "RequestEntityTooLarge"
// RequestTimeout specifies the request timeout state for http status code.
    case RequestTimeout = "RequestTimeout"
// RequestUriTooLong specifies the request uri too long state for http status code.
    case RequestUriTooLong = "RequestUriTooLong"
// ResetContent specifies the reset content state for http status code.
    case ResetContent = "ResetContent"
// SeeOther specifies the see other state for http status code.
    case SeeOther = "SeeOther"
// ServiceUnavailable specifies the service unavailable state for http status code.
    case ServiceUnavailable = "ServiceUnavailable"
// SwitchingProtocols specifies the switching protocols state for http status code.
    case SwitchingProtocols = "SwitchingProtocols"
// TemporaryRedirect specifies the temporary redirect state for http status code.
    case TemporaryRedirect = "TemporaryRedirect"
// Unauthorized specifies the unauthorized state for http status code.
    case Unauthorized = "Unauthorized"
// UnsupportedMediaType specifies the unsupported media type state for http status code.
    case UnsupportedMediaType = "UnsupportedMediaType"
// Unused specifies the unused state for http status code.
    case Unused = "Unused"
// UpgradeRequired specifies the upgrade required state for http status code.
    case UpgradeRequired = "UpgradeRequired"
// UseProxy specifies the use proxy state for http status code.
    case UseProxy = "UseProxy"
}


// 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 HybridRunbookWorkerData : HybridRunbookWorkerProtocol {
    public var name: String?
    public var ip: String?
    public var registrationTime: Date?

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

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

extension DataFactory {
  public static func createHybridRunbookWorkerProtocol() -> HybridRunbookWorkerProtocol {
    return HybridRunbookWorkerData()
  }
}


// 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 HybridRunbookWorkerGroupData : HybridRunbookWorkerGroupProtocol {
    public var id: String?
    public var name: String?
    public var hybridRunbookWorkers: [HybridRunbookWorkerProtocol?]?
    public var credential: RunAsCredentialAssociationPropertyProtocol?

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

  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(.hybridRunbookWorkers) {
        self.hybridRunbookWorkers = try container.decode([HybridRunbookWorkerData?]?.self, forKey: .hybridRunbookWorkers)
    }
    if container.contains(.credential) {
        self.credential = try container.decode(RunAsCredentialAssociationPropertyData?.self, forKey: .credential)
    }
    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.hybridRunbookWorkers != nil {try container.encode(self.hybridRunbookWorkers as! [HybridRunbookWorkerData?]?, forKey: .hybridRunbookWorkers)}
    if self.credential != nil {try container.encode(self.credential as! RunAsCredentialAssociationPropertyData?, forKey: .credential)}
  }
}

extension DataFactory {
  public static func createHybridRunbookWorkerGroupProtocol() -> HybridRunbookWorkerGroupProtocol {
    return HybridRunbookWorkerGroupData()
  }
}


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

extension DataFactory {
  public static func createHybridRunbookWorkerGroupsListResultProtocol() -> HybridRunbookWorkerGroupsListResultProtocol {
    return HybridRunbookWorkerGroupsListResultData()
  }
}


// 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 HybridRunbookWorkerGroupUpdateParametersData : HybridRunbookWorkerGroupUpdateParametersProtocol {
    public var credential: RunAsCredentialAssociationPropertyProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createHybridRunbookWorkerGroupUpdateParametersProtocol() -> HybridRunbookWorkerGroupUpdateParametersProtocol {
    return HybridRunbookWorkerGroupUpdateParametersData()
  }
}


// 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 JobCollectionItemData : JobCollectionItemProtocol, ProxyResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: JobCollectionItemPropertiesProtocol

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

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

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

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

extension DataFactory {
  public static func createJobCollectionItemProtocol(properties: JobCollectionItemPropertiesProtocol) -> JobCollectionItemProtocol {
    return JobCollectionItemData(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 JobCollectionItemPropertiesData : JobCollectionItemPropertiesProtocol {
    public var runbook: RunbookAssociationPropertyProtocol?
    public var jobId: String?
    public var creationTime: Date?
    public var status: JobStatusEnum?
    public var startTime: Date?
    public var endTime: Date?
    public var lastModifiedTime: Date?
    public var provisioningState: JobProvisioningStatePropertyProtocol?

        enum CodingKeys: String, CodingKey {case runbook = "runbook"
        case jobId = "jobId"
        case creationTime = "creationTime"
        case status = "status"
        case startTime = "startTime"
        case endTime = "endTime"
        case lastModifiedTime = "lastModifiedTime"
        case provisioningState = "provisioningState"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.runbook) {
        self.runbook = try container.decode(RunbookAssociationPropertyData?.self, forKey: .runbook)
    }
    if container.contains(.jobId) {
        self.jobId = try container.decode(String?.self, forKey: .jobId)
    }
    if container.contains(.creationTime) {
        self.creationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .creationTime)), format: .dateTime)
    }
    if container.contains(.status) {
        self.status = try container.decode(JobStatusEnum?.self, forKey: .status)
    }
    if container.contains(.startTime) {
        self.startTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .startTime)), format: .dateTime)
    }
    if container.contains(.endTime) {
        self.endTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .endTime)), format: .dateTime)
    }
    if container.contains(.lastModifiedTime) {
        self.lastModifiedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastModifiedTime)), format: .dateTime)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(JobProvisioningStatePropertyData?.self, forKey: .provisioningState)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.runbook != nil {try container.encode(self.runbook as! RunbookAssociationPropertyData?, forKey: .runbook)}
    if self.jobId != nil {try container.encode(self.jobId, forKey: .jobId)}
    if self.creationTime != nil {
        try container.encode(DateConverter.toString(date: self.creationTime!, format: .dateTime), forKey: .creationTime)
    }
    if self.status != nil {try container.encode(self.status, forKey: .status)}
    if self.startTime != nil {
        try container.encode(DateConverter.toString(date: self.startTime!, format: .dateTime), forKey: .startTime)
    }
    if self.endTime != nil {
        try container.encode(DateConverter.toString(date: self.endTime!, format: .dateTime), forKey: .endTime)
    }
    if self.lastModifiedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastModifiedTime!, format: .dateTime), forKey: .lastModifiedTime)
    }
    if self.provisioningState != nil {try container.encode(self.provisioningState as! JobProvisioningStatePropertyData?, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createJobCollectionItemPropertiesProtocol() -> JobCollectionItemPropertiesProtocol {
    return JobCollectionItemPropertiesData()
  }
}


// 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 JobCreateParametersData : JobCreateParametersProtocol {
    public var properties: JobCreatePropertiesProtocol

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

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

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

extension DataFactory {
  public static func createJobCreateParametersProtocol(properties: JobCreatePropertiesProtocol) -> JobCreateParametersProtocol {
    return JobCreateParametersData(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 JobCreatePropertiesData : JobCreatePropertiesProtocol {
    public var runbook: RunbookAssociationPropertyProtocol
    public var parameters: [String:String]?
    public var runOn: String?

        enum CodingKeys: String, CodingKey {case runbook = "runbook"
        case parameters = "parameters"
        case runOn = "runOn"
        }

  public init(runbook: RunbookAssociationPropertyProtocol)  {
    self.runbook = runbook
  }

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

extension DataFactory {
  public static func createJobCreatePropertiesProtocol(runbook: RunbookAssociationPropertyProtocol) -> JobCreatePropertiesProtocol {
    return JobCreatePropertiesData(runbook: runbook)
  }
}


// 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 JobData : JobProtocol, ProxyResourceProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: JobPropertiesProtocol?

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

extension DataFactory {
  public static func createJobProtocol() -> JobProtocol {
    return JobData()
  }
}


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

extension DataFactory {
  public static func createJobListResultProtocol() -> JobListResultProtocol {
    return JobListResultData()
  }
}


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

extension DataFactory {
  public static func createJobListResultV2Protocol() -> JobListResultV2Protocol {
    return JobListResultV2Data()
  }
}


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

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createJobNavigationProtocol() -> JobNavigationProtocol {
    return JobNavigationData()
  }
}


// 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 JobPropertiesData : JobPropertiesProtocol {
    public var runbook: RunbookAssociationPropertyProtocol?
    public var startedBy: String?
    public var runOn: String?
    public var jobId: String?
    public var creationTime: Date?
    public var status: JobStatusEnum?
    public var statusDetails: String?
    public var startTime: Date?
    public var endTime: Date?
    public var exception: String?
    public var lastModifiedTime: Date?
    public var lastStatusModifiedTime: Date?
    public var parameters: [String:String]?
    public var provisioningState: JobProvisioningStatePropertyProtocol?

        enum CodingKeys: String, CodingKey {case runbook = "runbook"
        case startedBy = "startedBy"
        case runOn = "runOn"
        case jobId = "jobId"
        case creationTime = "creationTime"
        case status = "status"
        case statusDetails = "statusDetails"
        case startTime = "startTime"
        case endTime = "endTime"
        case exception = "exception"
        case lastModifiedTime = "lastModifiedTime"
        case lastStatusModifiedTime = "lastStatusModifiedTime"
        case parameters = "parameters"
        case provisioningState = "provisioningState"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.runbook) {
        self.runbook = try container.decode(RunbookAssociationPropertyData?.self, forKey: .runbook)
    }
    if container.contains(.startedBy) {
        self.startedBy = try container.decode(String?.self, forKey: .startedBy)
    }
    if container.contains(.runOn) {
        self.runOn = try container.decode(String?.self, forKey: .runOn)
    }
    if container.contains(.jobId) {
        self.jobId = try container.decode(String?.self, forKey: .jobId)
    }
    if container.contains(.creationTime) {
        self.creationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .creationTime)), format: .dateTime)
    }
    if container.contains(.status) {
        self.status = try container.decode(JobStatusEnum?.self, forKey: .status)
    }
    if container.contains(.statusDetails) {
        self.statusDetails = try container.decode(String?.self, forKey: .statusDetails)
    }
    if container.contains(.startTime) {
        self.startTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .startTime)), format: .dateTime)
    }
    if container.contains(.endTime) {
        self.endTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .endTime)), format: .dateTime)
    }
    if container.contains(.exception) {
        self.exception = try container.decode(String?.self, forKey: .exception)
    }
    if container.contains(.lastModifiedTime) {
        self.lastModifiedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastModifiedTime)), format: .dateTime)
    }
    if container.contains(.lastStatusModifiedTime) {
        self.lastStatusModifiedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastStatusModifiedTime)), format: .dateTime)
    }
    if container.contains(.parameters) {
        self.parameters = try container.decode([String:String]?.self, forKey: .parameters)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(JobProvisioningStatePropertyData?.self, forKey: .provisioningState)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.runbook != nil {try container.encode(self.runbook as! RunbookAssociationPropertyData?, forKey: .runbook)}
    if self.startedBy != nil {try container.encode(self.startedBy, forKey: .startedBy)}
    if self.runOn != nil {try container.encode(self.runOn, forKey: .runOn)}
    if self.jobId != nil {try container.encode(self.jobId, forKey: .jobId)}
    if self.creationTime != nil {
        try container.encode(DateConverter.toString(date: self.creationTime!, format: .dateTime), forKey: .creationTime)
    }
    if self.status != nil {try container.encode(self.status, forKey: .status)}
    if self.statusDetails != nil {try container.encode(self.statusDetails, forKey: .statusDetails)}
    if self.startTime != nil {
        try container.encode(DateConverter.toString(date: self.startTime!, format: .dateTime), forKey: .startTime)
    }
    if self.endTime != nil {
        try container.encode(DateConverter.toString(date: self.endTime!, format: .dateTime), forKey: .endTime)
    }
    if self.exception != nil {try container.encode(self.exception, forKey: .exception)}
    if self.lastModifiedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastModifiedTime!, format: .dateTime), forKey: .lastModifiedTime)
    }
    if self.lastStatusModifiedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastStatusModifiedTime!, format: .dateTime), forKey: .lastStatusModifiedTime)
    }
    if self.parameters != nil {try container.encode(self.parameters, forKey: .parameters)}
    if self.provisioningState != nil {try container.encode(self.provisioningState as! JobProvisioningStatePropertyData?, forKey: .provisioningState)}
  }
}

extension DataFactory {
  public static func createJobPropertiesProtocol() -> JobPropertiesProtocol {
    return JobPropertiesData()
  }
}


// JobProvisioningState enumerates the values for job 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 JobProvisioningStateEnum: String, Codable
{
// JobProvisioningStateFailed specifies the job provisioning state failed state for job provisioning state.
    case JobProvisioningStateFailed = "Failed"
// JobProvisioningStateProcessing specifies the job provisioning state processing state for job provisioning state.
    case JobProvisioningStateProcessing = "Processing"
// JobProvisioningStateSucceeded specifies the job provisioning state succeeded state for job provisioning state.
    case JobProvisioningStateSucceeded = "Succeeded"
// JobProvisioningStateSuspended specifies the job provisioning state suspended state for job provisioning state.
    case JobProvisioningStateSuspended = "Suspended"
}


// 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 JobProvisioningStatePropertyData : JobProvisioningStatePropertyProtocol {
    public var provisioningState: JobProvisioningStateEnum?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createJobProvisioningStatePropertyProtocol() -> JobProvisioningStatePropertyProtocol {
    return JobProvisioningStatePropertyData()
  }
}


// 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 JobScheduleCreateParametersData : JobScheduleCreateParametersProtocol {
    public var properties: JobScheduleCreatePropertiesProtocol

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

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

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

extension DataFactory {
  public static func createJobScheduleCreateParametersProtocol(properties: JobScheduleCreatePropertiesProtocol) -> JobScheduleCreateParametersProtocol {
    return JobScheduleCreateParametersData(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 JobScheduleCreatePropertiesData : JobScheduleCreatePropertiesProtocol {
    public var schedule: ScheduleAssociationPropertyProtocol
    public var runbook: RunbookAssociationPropertyProtocol
    public var runOn: String?
    public var parameters: [String:String]?

        enum CodingKeys: String, CodingKey {case schedule = "schedule"
        case runbook = "runbook"
        case runOn = "runOn"
        case parameters = "parameters"
        }

  public init(schedule: ScheduleAssociationPropertyProtocol, runbook: RunbookAssociationPropertyProtocol)  {
    self.schedule = schedule
    self.runbook = runbook
  }

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

extension DataFactory {
  public static func createJobScheduleCreatePropertiesProtocol(schedule: ScheduleAssociationPropertyProtocol, runbook: RunbookAssociationPropertyProtocol) -> JobScheduleCreatePropertiesProtocol {
    return JobScheduleCreatePropertiesData(schedule: schedule, runbook: runbook)
  }
}


// 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 JobScheduleData : JobScheduleProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: JobSchedulePropertiesProtocol?

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

extension DataFactory {
  public static func createJobScheduleProtocol() -> JobScheduleProtocol {
    return JobScheduleData()
  }
}


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

extension DataFactory {
  public static func createJobScheduleListResultProtocol() -> JobScheduleListResultProtocol {
    return JobScheduleListResultData()
  }
}


// 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 JobSchedulePropertiesData : JobSchedulePropertiesProtocol {
    public var jobScheduleId: String?
    public var schedule: ScheduleAssociationPropertyProtocol?
    public var runbook: RunbookAssociationPropertyProtocol?
    public var runOn: String?
    public var parameters: [String:String]?

        enum CodingKeys: String, CodingKey {case jobScheduleId = "jobScheduleId"
        case schedule = "schedule"
        case runbook = "runbook"
        case runOn = "runOn"
        case parameters = "parameters"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createJobSchedulePropertiesProtocol() -> JobSchedulePropertiesProtocol {
    return JobSchedulePropertiesData()
  }
}


// JobStatus enumerates the values for job 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 JobStatusEnum: String, Codable
{
// JobStatusActivating specifies the job status activating state for job status.
    case JobStatusActivating = "Activating"
// JobStatusBlocked specifies the job status blocked state for job status.
    case JobStatusBlocked = "Blocked"
// JobStatusCompleted specifies the job status completed state for job status.
    case JobStatusCompleted = "Completed"
// JobStatusDisconnected specifies the job status disconnected state for job status.
    case JobStatusDisconnected = "Disconnected"
// JobStatusFailed specifies the job status failed state for job status.
    case JobStatusFailed = "Failed"
// JobStatusNew specifies the job status new state for job status.
    case JobStatusNew = "New"
// JobStatusRemoving specifies the job status removing state for job status.
    case JobStatusRemoving = "Removing"
// JobStatusResuming specifies the job status resuming state for job status.
    case JobStatusResuming = "Resuming"
// JobStatusRunning specifies the job status running state for job status.
    case JobStatusRunning = "Running"
// JobStatusStopped specifies the job status stopped state for job status.
    case JobStatusStopped = "Stopped"
// JobStatusStopping specifies the job status stopping state for job status.
    case JobStatusStopping = "Stopping"
// JobStatusSuspended specifies the job status suspended state for job status.
    case JobStatusSuspended = "Suspended"
// JobStatusSuspending specifies the job status suspending state for job status.
    case JobStatusSuspending = "Suspending"
}


// 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 JobStreamData : JobStreamProtocol {
    public var id: String?
    public var properties: JobStreamPropertiesProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createJobStreamProtocol() -> JobStreamProtocol {
    return JobStreamData()
  }
}


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

extension DataFactory {
  public static func createJobStreamListResultProtocol() -> JobStreamListResultProtocol {
    return JobStreamListResultData()
  }
}


// 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 JobStreamPropertiesData : JobStreamPropertiesProtocol {
    public var jobStreamId: String?
    public var time: Date?
    public var streamType: JobStreamTypeEnum?
    public var streamText: String?
    public var summary: String?
    public var value: [String:[String: String?]]?

        enum CodingKeys: String, CodingKey {case jobStreamId = "jobStreamId"
        case time = "time"
        case streamType = "streamType"
        case streamText = "streamText"
        case summary = "summary"
        case value = "value"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.jobStreamId) {
        self.jobStreamId = try container.decode(String?.self, forKey: .jobStreamId)
    }
    if container.contains(.time) {
        self.time = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .time)), format: .dateTime)
    }
    if container.contains(.streamType) {
        self.streamType = try container.decode(JobStreamTypeEnum?.self, forKey: .streamType)
    }
    if container.contains(.streamText) {
        self.streamText = try container.decode(String?.self, forKey: .streamText)
    }
    if container.contains(.summary) {
        self.summary = try container.decode(String?.self, forKey: .summary)
    }
    if container.contains(.value) {
        self.value = try container.decode([String:[String: String?]]?.self, forKey: .value)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

  public func encode(to encoder: Encoder) throws {
    var container = encoder.container(keyedBy: CodingKeys.self)
    if self.jobStreamId != nil {try container.encode(self.jobStreamId, forKey: .jobStreamId)}
    if self.time != nil {
        try container.encode(DateConverter.toString(date: self.time!, format: .dateTime), forKey: .time)
    }
    if self.streamType != nil {try container.encode(self.streamType, forKey: .streamType)}
    if self.streamText != nil {try container.encode(self.streamText, forKey: .streamText)}
    if self.summary != nil {try container.encode(self.summary, forKey: .summary)}
    if self.value != nil {try container.encode(self.value, forKey: .value)}
  }
}

extension DataFactory {
  public static func createJobStreamPropertiesProtocol() -> JobStreamPropertiesProtocol {
    return JobStreamPropertiesData()
  }
}


// JobStreamType enumerates the values for job stream 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 JobStreamTypeEnum: String, Codable
{
// _any specifies the _ any state for job stream type.
    case _any = "Any"
// Debug specifies the debug state for job stream type.
    case Debug = "Debug"
// Error specifies the error state for job stream type.
    case Error = "Error"
// Output specifies the output state for job stream type.
    case Output = "Output"
// Progress specifies the progress state for job stream type.
    case Progress = "Progress"
// Verbose specifies the verbose state for job stream type.
    case Verbose = "Verbose"
// Warning specifies the warning state for job stream type.
    case Warning = "Warning"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct LinkedWorkspaceData : LinkedWorkspaceProtocol {
    public var id: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createLinkedWorkspaceProtocol() -> LinkedWorkspaceProtocol {
    return LinkedWorkspaceData()
  }
}


// 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 LinuxPropertiesData : LinuxPropertiesProtocol {
    public var includedPackageClassifications: LinuxUpdateClassesEnum?
    public var excludedPackageNameMasks: [String]?

        enum CodingKeys: String, CodingKey {case includedPackageClassifications = "includedPackageClassifications"
        case excludedPackageNameMasks = "excludedPackageNameMasks"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createLinuxPropertiesProtocol() -> LinuxPropertiesProtocol {
    return LinuxPropertiesData()
  }
}


// LinuxUpdateClasses enumerates the values for linux update classes.

// 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 LinuxUpdateClassesEnum: String, Codable
{
// Critical specifies the critical state for linux update classes.
    case Critical = "Critical"
// Other specifies the other state for linux update classes.
    case Other = "Other"
// Security specifies the security state for linux update classes.
    case Security = "Security"
// Unclassified specifies the unclassified state for linux update classes.
    case Unclassified = "Unclassified"
}


// 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 ModuleCreateOrUpdateParametersData : ModuleCreateOrUpdateParametersProtocol {
    public var properties: ModuleCreateOrUpdatePropertiesProtocol
    public var name: String?
    public var location: String?
    public var tags: [String:String]?

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

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

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

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

  public init(contentLink: ContentLinkProtocol)  {
    self.contentLink = contentLink
  }

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

extension DataFactory {
  public static func createModuleCreateOrUpdatePropertiesProtocol(contentLink: ContentLinkProtocol) -> ModuleCreateOrUpdatePropertiesProtocol {
    return ModuleCreateOrUpdatePropertiesData(contentLink: contentLink)
  }
}


// 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 ModuleData : ModuleProtocol, 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: ModulePropertiesProtocol?
    public var etag: String?

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

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

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

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

extension DataFactory {
  public static func createModuleProtocol(location: String) -> ModuleProtocol {
    return ModuleData(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 ModuleErrorInfoData : ModuleErrorInfoProtocol {
    public var code: String?
    public var message: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createModuleErrorInfoProtocol() -> ModuleErrorInfoProtocol {
    return ModuleErrorInfoData()
  }
}


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

extension DataFactory {
  public static func createModuleListResultProtocol() -> ModuleListResultProtocol {
    return ModuleListResultData()
  }
}


// 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 ModulePropertiesData : ModulePropertiesProtocol {
    public var isGlobal: Bool?
    public var version: String?
    public var sizeInBytes: Int64?
    public var activityCount: Int32?
    public var provisioningState: ModuleProvisioningStateEnum?
    public var contentLink: ContentLinkProtocol?
    public var error: ModuleErrorInfoProtocol?
    public var creationTime: Date?
    public var lastModifiedTime: Date?
    public var description: String?

        enum CodingKeys: String, CodingKey {case isGlobal = "isGlobal"
        case version = "version"
        case sizeInBytes = "sizeInBytes"
        case activityCount = "activityCount"
        case provisioningState = "provisioningState"
        case contentLink = "contentLink"
        case error = "error"
        case creationTime = "creationTime"
        case lastModifiedTime = "lastModifiedTime"
        case description = "description"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.isGlobal) {
        self.isGlobal = try container.decode(Bool?.self, forKey: .isGlobal)
    }
    if container.contains(.version) {
        self.version = try container.decode(String?.self, forKey: .version)
    }
    if container.contains(.sizeInBytes) {
        self.sizeInBytes = try container.decode(Int64?.self, forKey: .sizeInBytes)
    }
    if container.contains(.activityCount) {
        self.activityCount = try container.decode(Int32?.self, forKey: .activityCount)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(ModuleProvisioningStateEnum?.self, forKey: .provisioningState)
    }
    if container.contains(.contentLink) {
        self.contentLink = try container.decode(ContentLinkData?.self, forKey: .contentLink)
    }
    if container.contains(.error) {
        self.error = try container.decode(ModuleErrorInfoData?.self, forKey: .error)
    }
    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(.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.isGlobal != nil {try container.encode(self.isGlobal, forKey: .isGlobal)}
    if self.version != nil {try container.encode(self.version, forKey: .version)}
    if self.sizeInBytes != nil {try container.encode(self.sizeInBytes, forKey: .sizeInBytes)}
    if self.activityCount != nil {try container.encode(self.activityCount, forKey: .activityCount)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.contentLink != nil {try container.encode(self.contentLink as! ContentLinkData?, forKey: .contentLink)}
    if self.error != nil {try container.encode(self.error as! ModuleErrorInfoData?, forKey: .error)}
    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.description != nil {try container.encode(self.description, forKey: .description)}
  }
}

extension DataFactory {
  public static func createModulePropertiesProtocol() -> ModulePropertiesProtocol {
    return ModulePropertiesData()
  }
}


// ModuleProvisioningState enumerates the values for module 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 ModuleProvisioningStateEnum: String, Codable
{
// ModuleProvisioningStateActivitiesStored specifies the module provisioning state activities stored state for module
// provisioning state.
    case ModuleProvisioningStateActivitiesStored = "ActivitiesStored"
// ModuleProvisioningStateCancelled specifies the module provisioning state cancelled state for module provisioning
// state.
    case ModuleProvisioningStateCancelled = "Cancelled"
// ModuleProvisioningStateConnectionTypeImported specifies the module provisioning state connection type imported state
// for module provisioning state.
    case ModuleProvisioningStateConnectionTypeImported = "ConnectionTypeImported"
// ModuleProvisioningStateContentDownloaded specifies the module provisioning state content downloaded state for module
// provisioning state.
    case ModuleProvisioningStateContentDownloaded = "ContentDownloaded"
// ModuleProvisioningStateContentRetrieved specifies the module provisioning state content retrieved state for module
// provisioning state.
    case ModuleProvisioningStateContentRetrieved = "ContentRetrieved"
// ModuleProvisioningStateContentStored specifies the module provisioning state content stored state for module
// provisioning state.
    case ModuleProvisioningStateContentStored = "ContentStored"
// ModuleProvisioningStateContentValidated specifies the module provisioning state content validated state for module
// provisioning state.
    case ModuleProvisioningStateContentValidated = "ContentValidated"
// ModuleProvisioningStateCreated specifies the module provisioning state created state for module provisioning state.
    case ModuleProvisioningStateCreated = "Created"
// ModuleProvisioningStateCreating specifies the module provisioning state creating state for module provisioning
// state.
    case ModuleProvisioningStateCreating = "Creating"
// ModuleProvisioningStateFailed specifies the module provisioning state failed state for module provisioning state.
    case ModuleProvisioningStateFailed = "Failed"
// ModuleProvisioningStateModuleDataStored specifies the module provisioning state module data stored state for module
// provisioning state.
    case ModuleProvisioningStateModuleDataStored = "ModuleDataStored"
// ModuleProvisioningStateModuleImportRunbookComplete specifies the module provisioning state module import runbook
// complete state for module provisioning state.
    case ModuleProvisioningStateModuleImportRunbookComplete = "ModuleImportRunbookComplete"
// ModuleProvisioningStateRunningImportModuleRunbook specifies the module provisioning state running import module
// runbook state for module provisioning state.
    case ModuleProvisioningStateRunningImportModuleRunbook = "RunningImportModuleRunbook"
// ModuleProvisioningStateStartingImportModuleRunbook specifies the module provisioning state starting import module
// runbook state for module provisioning state.
    case ModuleProvisioningStateStartingImportModuleRunbook = "StartingImportModuleRunbook"
// ModuleProvisioningStateSucceeded specifies the module provisioning state succeeded state for module provisioning
// state.
    case ModuleProvisioningStateSucceeded = "Succeeded"
// ModuleProvisioningStateUpdating specifies the module provisioning state updating state for module provisioning
// state.
    case ModuleProvisioningStateUpdating = "Updating"
}


// 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 ModuleUpdateParametersData : ModuleUpdateParametersProtocol {
    public var properties: ModuleUpdatePropertiesProtocol?
    public var name: String?
    public var location: String?
    public var tags: [String:String]?

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


// 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 ModuleUpdatePropertiesData : ModuleUpdatePropertiesProtocol {
    public var contentLink: ContentLinkProtocol?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createModuleUpdatePropertiesProtocol() -> ModuleUpdatePropertiesProtocol {
    return ModuleUpdatePropertiesData()
  }
}


// OperatingSystemType enumerates the values for operating system 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 OperatingSystemTypeEnum: String, Codable
{
// Linux specifies the linux state for operating system type.
    case Linux = "Linux"
// Windows specifies the windows state for operating system type.
    case Windows = "Windows"
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct OperationData : OperationProtocol {
    public var name: String?
    public var display: OperationDisplayProtocol?

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

  public init()  {
  }

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

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

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


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct OperationDisplayData : OperationDisplayProtocol {
    public var provider: String?
    public var resource: String?
    public var operation: String?

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

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

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?]?

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

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

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


// ProvisioningState enumerates the values for 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 ProvisioningStateEnum: String, Codable
{
// Completed specifies the completed state for provisioning state.
    case Completed = "Completed"
// Failed specifies the failed state for provisioning state.
    case Failed = "Failed"
// Running specifies the running state for provisioning state.
    case Running = "Running"
}


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

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

  public init()  {
  }

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

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

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


// 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(location: String)  {
    self.location = location
  }

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

extension DataFactory {
  public static func createResourceProtocol(location: String) -> ResourceProtocol {
    return ResourceData(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 RunAsCredentialAssociationPropertyData : RunAsCredentialAssociationPropertyProtocol {
    public var name: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createRunAsCredentialAssociationPropertyProtocol() -> RunAsCredentialAssociationPropertyProtocol {
    return RunAsCredentialAssociationPropertyData()
  }
}


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

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createRunbookAssociationPropertyProtocol() -> RunbookAssociationPropertyProtocol {
    return RunbookAssociationPropertyData()
  }
}