// 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 RunbookCreateOrUpdateDraftParametersData : RunbookCreateOrUpdateDraftParametersProtocol {
    public var runbookContent: String

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

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

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

extension DataFactory {
  public static func createRunbookCreateOrUpdateDraftParametersProtocol(runbookContent: String) -> RunbookCreateOrUpdateDraftParametersProtocol {
    return RunbookCreateOrUpdateDraftParametersData(runbookContent: runbookContent)
  }
}


// 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 RunbookCreateOrUpdateDraftPropertiesData : RunbookCreateOrUpdateDraftPropertiesProtocol {
    public var logVerbose: Bool?
    public var logProgress: Bool?
    public var runbookType: RunbookTypeEnumEnum
    public var draft: RunbookDraftProtocol
    public var description: String?
    public var logActivityTrace: Int32?

        enum CodingKeys: String, CodingKey {case logVerbose = "logVerbose"
        case logProgress = "logProgress"
        case runbookType = "runbookType"
        case draft = "draft"
        case description = "description"
        case logActivityTrace = "logActivityTrace"
        }

  public init(runbookType: RunbookTypeEnumEnum, draft: RunbookDraftProtocol)  {
    self.runbookType = runbookType
    self.draft = draft
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.logVerbose) {
        self.logVerbose = try container.decode(Bool?.self, forKey: .logVerbose)
    }
    if container.contains(.logProgress) {
        self.logProgress = try container.decode(Bool?.self, forKey: .logProgress)
    }
    self.runbookType = try container.decode(RunbookTypeEnumEnum.self, forKey: .runbookType)
    self.draft = try container.decode(RunbookDraftData.self, forKey: .draft)
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    if container.contains(.logActivityTrace) {
        self.logActivityTrace = try container.decode(Int32?.self, forKey: .logActivityTrace)
    }
    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.logVerbose != nil {try container.encode(self.logVerbose, forKey: .logVerbose)}
    if self.logProgress != nil {try container.encode(self.logProgress, forKey: .logProgress)}
    try container.encode(self.runbookType, forKey: .runbookType)
    try container.encode(self.draft as! RunbookDraftData, forKey: .draft)
    if self.description != nil {try container.encode(self.description, forKey: .description)}
    if self.logActivityTrace != nil {try container.encode(self.logActivityTrace, forKey: .logActivityTrace)}
  }
}

extension DataFactory {
  public static func createRunbookCreateOrUpdateDraftPropertiesProtocol(runbookType: RunbookTypeEnumEnum, draft: RunbookDraftProtocol) -> RunbookCreateOrUpdateDraftPropertiesProtocol {
    return RunbookCreateOrUpdateDraftPropertiesData(runbookType: runbookType, draft: draft)
  }
}


// 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 RunbookCreateOrUpdateParametersData : RunbookCreateOrUpdateParametersProtocol {
    public var properties: RunbookCreateOrUpdatePropertiesProtocol
    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: RunbookCreateOrUpdatePropertiesProtocol)  {
    self.properties = properties
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.properties = try container.decode(RunbookCreateOrUpdatePropertiesData.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! RunbookCreateOrUpdatePropertiesData, 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 createRunbookCreateOrUpdateParametersProtocol(properties: RunbookCreateOrUpdatePropertiesProtocol) -> RunbookCreateOrUpdateParametersProtocol {
    return RunbookCreateOrUpdateParametersData(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 RunbookCreateOrUpdatePropertiesData : RunbookCreateOrUpdatePropertiesProtocol {
    public var logVerbose: Bool?
    public var logProgress: Bool?
    public var runbookType: RunbookTypeEnumEnum
    public var draft: RunbookDraftProtocol?
    public var publishContentLink: ContentLinkProtocol?
    public var description: String?
    public var logActivityTrace: Int32?

        enum CodingKeys: String, CodingKey {case logVerbose = "logVerbose"
        case logProgress = "logProgress"
        case runbookType = "runbookType"
        case draft = "draft"
        case publishContentLink = "publishContentLink"
        case description = "description"
        case logActivityTrace = "logActivityTrace"
        }

  public init(runbookType: RunbookTypeEnumEnum)  {
    self.runbookType = runbookType
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.logVerbose) {
        self.logVerbose = try container.decode(Bool?.self, forKey: .logVerbose)
    }
    if container.contains(.logProgress) {
        self.logProgress = try container.decode(Bool?.self, forKey: .logProgress)
    }
    self.runbookType = try container.decode(RunbookTypeEnumEnum.self, forKey: .runbookType)
    if container.contains(.draft) {
        self.draft = try container.decode(RunbookDraftData?.self, forKey: .draft)
    }
    if container.contains(.publishContentLink) {
        self.publishContentLink = try container.decode(ContentLinkData?.self, forKey: .publishContentLink)
    }
    if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
    if container.contains(.logActivityTrace) {
        self.logActivityTrace = try container.decode(Int32?.self, forKey: .logActivityTrace)
    }
    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.logVerbose != nil {try container.encode(self.logVerbose, forKey: .logVerbose)}
    if self.logProgress != nil {try container.encode(self.logProgress, forKey: .logProgress)}
    try container.encode(self.runbookType, forKey: .runbookType)
    if self.draft != nil {try container.encode(self.draft as! RunbookDraftData?, forKey: .draft)}
    if self.publishContentLink != nil {try container.encode(self.publishContentLink as! ContentLinkData?, forKey: .publishContentLink)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
    if self.logActivityTrace != nil {try container.encode(self.logActivityTrace, forKey: .logActivityTrace)}
  }
}

extension DataFactory {
  public static func createRunbookCreateOrUpdatePropertiesProtocol(runbookType: RunbookTypeEnumEnum) -> RunbookCreateOrUpdatePropertiesProtocol {
    return RunbookCreateOrUpdatePropertiesData(runbookType: runbookType)
  }
}


// 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 RunbookData : RunbookProtocol, 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: RunbookPropertiesProtocol?
    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(RunbookPropertiesData?.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! RunbookPropertiesData?, forKey: .properties)}
    if self.etag != nil {try container.encode(self.etag, forKey: .etag)}
  }
}

extension DataFactory {
  public static func createRunbookProtocol(location: String) -> RunbookProtocol {
    return RunbookData(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 RunbookDraftData : RunbookDraftProtocol {
    public var inEdit: Bool?
    public var draftContentLink: ContentLinkProtocol?
    public var creationTime: Date?
    public var lastModifiedTime: Date?
    public var parameters: [String:RunbookParameterProtocol?]?
    public var outputTypes: [String]?

        enum CodingKeys: String, CodingKey {case inEdit = "inEdit"
        case draftContentLink = "draftContentLink"
        case creationTime = "creationTime"
        case lastModifiedTime = "lastModifiedTime"
        case parameters = "parameters"
        case outputTypes = "outputTypes"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRunbookDraftProtocol() -> RunbookDraftProtocol {
    return RunbookDraftData()
  }
}


// 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 RunbookDraftPublishHeadersData : RunbookDraftPublishHeadersProtocol {
    public var location: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createRunbookDraftPublishHeadersProtocol() -> RunbookDraftPublishHeadersProtocol {
    return RunbookDraftPublishHeadersData()
  }
}


// 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 RunbookDraftReplaceContentHeadersData : RunbookDraftReplaceContentHeadersProtocol {
    public var location: String?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createRunbookDraftReplaceContentHeadersProtocol() -> RunbookDraftReplaceContentHeadersProtocol {
    return RunbookDraftReplaceContentHeadersData()
  }
}


// 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 RunbookDraftUndoEditResultData : RunbookDraftUndoEditResultProtocol {
    public var statusCode: HttpStatusCodeEnum?
    public var requestId: String?

        enum CodingKeys: String, CodingKey {case statusCode = "statusCode"
        case requestId = "requestId"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRunbookDraftUndoEditResultProtocol() -> RunbookDraftUndoEditResultProtocol {
    return RunbookDraftUndoEditResultData()
  }
}


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

extension DataFactory {
  public static func createRunbookListResultProtocol() -> RunbookListResultProtocol {
    return RunbookListResultData()
  }
}


// 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 RunbookParameterData : RunbookParameterProtocol {
    public var type: String?
    public var isMandatory: Bool?
    public var position: Int32?
    public var defaultValue: String?

        enum CodingKeys: String, CodingKey {case type = "type"
        case isMandatory = "isMandatory"
        case position = "position"
        case defaultValue = "defaultValue"
        }

  public init()  {
  }

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

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

extension DataFactory {
  public static func createRunbookParameterProtocol() -> RunbookParameterProtocol {
    return RunbookParameterData()
  }
}


// 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 RunbookPropertiesData : RunbookPropertiesProtocol {
    public var runbookType: RunbookTypeEnumEnum?
    public var publishContentLink: ContentLinkProtocol?
    public var state: RunbookStateEnum?
    public var logVerbose: Bool?
    public var logProgress: Bool?
    public var logActivityTrace: Int32?
    public var jobCount: Int32?
    public var parameters: [String:RunbookParameterProtocol?]?
    public var outputTypes: [String]?
    public var draft: RunbookDraftProtocol?
    public var provisioningState: RunbookProvisioningStateEnum?
    public var lastModifiedBy: String?
    public var creationTime: Date?
    public var lastModifiedTime: Date?
    public var description: String?

        enum CodingKeys: String, CodingKey {case runbookType = "runbookType"
        case publishContentLink = "publishContentLink"
        case state = "state"
        case logVerbose = "logVerbose"
        case logProgress = "logProgress"
        case logActivityTrace = "logActivityTrace"
        case jobCount = "jobCount"
        case parameters = "parameters"
        case outputTypes = "outputTypes"
        case draft = "draft"
        case provisioningState = "provisioningState"
        case lastModifiedBy = "lastModifiedBy"
        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(.runbookType) {
        self.runbookType = try container.decode(RunbookTypeEnumEnum?.self, forKey: .runbookType)
    }
    if container.contains(.publishContentLink) {
        self.publishContentLink = try container.decode(ContentLinkData?.self, forKey: .publishContentLink)
    }
    if container.contains(.state) {
        self.state = try container.decode(RunbookStateEnum?.self, forKey: .state)
    }
    if container.contains(.logVerbose) {
        self.logVerbose = try container.decode(Bool?.self, forKey: .logVerbose)
    }
    if container.contains(.logProgress) {
        self.logProgress = try container.decode(Bool?.self, forKey: .logProgress)
    }
    if container.contains(.logActivityTrace) {
        self.logActivityTrace = try container.decode(Int32?.self, forKey: .logActivityTrace)
    }
    if container.contains(.jobCount) {
        self.jobCount = try container.decode(Int32?.self, forKey: .jobCount)
    }
    if container.contains(.parameters) {
        self.parameters = try container.decode([String:RunbookParameterData?]?.self, forKey: .parameters)
    }
    if container.contains(.outputTypes) {
        self.outputTypes = try container.decode([String]?.self, forKey: .outputTypes)
    }
    if container.contains(.draft) {
        self.draft = try container.decode(RunbookDraftData?.self, forKey: .draft)
    }
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(RunbookProvisioningStateEnum?.self, forKey: .provisioningState)
    }
    if container.contains(.lastModifiedBy) {
        self.lastModifiedBy = try container.decode(String?.self, forKey: .lastModifiedBy)
    }
    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.runbookType != nil {try container.encode(self.runbookType, forKey: .runbookType)}
    if self.publishContentLink != nil {try container.encode(self.publishContentLink as! ContentLinkData?, forKey: .publishContentLink)}
    if self.state != nil {try container.encode(self.state, forKey: .state)}
    if self.logVerbose != nil {try container.encode(self.logVerbose, forKey: .logVerbose)}
    if self.logProgress != nil {try container.encode(self.logProgress, forKey: .logProgress)}
    if self.logActivityTrace != nil {try container.encode(self.logActivityTrace, forKey: .logActivityTrace)}
    if self.jobCount != nil {try container.encode(self.jobCount, forKey: .jobCount)}
    if self.parameters != nil {try container.encode(self.parameters, forKey: .parameters)}
    if self.outputTypes != nil {try container.encode(self.outputTypes as! [String]?, forKey: .outputTypes)}
    if self.draft != nil {try container.encode(self.draft as! RunbookDraftData?, forKey: .draft)}
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.lastModifiedBy != nil {try container.encode(self.lastModifiedBy, forKey: .lastModifiedBy)}
    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 createRunbookPropertiesProtocol() -> RunbookPropertiesProtocol {
    return RunbookPropertiesData()
  }
}


// RunbookProvisioningState enumerates the values for runbook 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 RunbookProvisioningStateEnum: String, Codable
{
// RunbookProvisioningStateSucceeded specifies the runbook provisioning state succeeded state for runbook provisioning
// state.
    case RunbookProvisioningStateSucceeded = "Succeeded"
}


// RunbookState enumerates the values for runbook 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 RunbookStateEnum: String, Codable
{
// RunbookStateEdit specifies the runbook state edit state for runbook state.
    case RunbookStateEdit = "Edit"
// RunbookStateNew specifies the runbook state new state for runbook state.
    case RunbookStateNew = "New"
// RunbookStatePublished specifies the runbook state published state for runbook state.
    case RunbookStatePublished = "Published"
}


// RunbookTypeEnum enumerates the values for runbook type enum.

// 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 RunbookTypeEnumEnum: String, Codable
{
// Graph specifies the graph state for runbook type enum.
    case Graph = "Graph"
// GraphPowerShell specifies the graph power shell state for runbook type enum.
    case GraphPowerShell = "GraphPowerShell"
// GraphPowerShellWorkflow specifies the graph power shell workflow state for runbook type enum.
    case GraphPowerShellWorkflow = "GraphPowerShellWorkflow"
// PowerShell specifies the power shell state for runbook type enum.
    case PowerShell = "PowerShell"
// PowerShellWorkflow specifies the power shell workflow state for runbook type enum.
    case PowerShellWorkflow = "PowerShellWorkflow"
// Script specifies the script state for runbook type enum.
    case Script = "Script"
}


// 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 RunbookUpdateParametersData : RunbookUpdateParametersProtocol {
    public var properties: RunbookUpdatePropertiesProtocol?
    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(RunbookUpdatePropertiesData?.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! RunbookUpdatePropertiesData?, 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 createRunbookUpdateParametersProtocol() -> RunbookUpdateParametersProtocol {
    return RunbookUpdateParametersData()
  }
}


// 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 RunbookUpdatePropertiesData : RunbookUpdatePropertiesProtocol {
    public var description: String?
    public var logVerbose: Bool?
    public var logProgress: Bool?
    public var logActivityTrace: Int32?

        enum CodingKeys: String, CodingKey {case description = "description"
        case logVerbose = "logVerbose"
        case logProgress = "logProgress"
        case logActivityTrace = "logActivityTrace"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createRunbookUpdatePropertiesProtocol() -> RunbookUpdatePropertiesProtocol {
    return RunbookUpdatePropertiesData()
  }
}


// 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 ScheduleAssociationPropertyData : ScheduleAssociationPropertyProtocol {
    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 createScheduleAssociationPropertyProtocol() -> ScheduleAssociationPropertyProtocol {
    return ScheduleAssociationPropertyData()
  }
}


// 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 ScheduleCreateOrUpdateParametersData : ScheduleCreateOrUpdateParametersProtocol {
    public var name: String
    public var properties: ScheduleCreateOrUpdatePropertiesProtocol

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

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

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

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

extension DataFactory {
  public static func createScheduleCreateOrUpdateParametersProtocol(name: String, properties: ScheduleCreateOrUpdatePropertiesProtocol) -> ScheduleCreateOrUpdateParametersProtocol {
    return ScheduleCreateOrUpdateParametersData(name: name, properties: properties)
  }
}


// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.
//
// Code generated by Microsoft (R) AutoRest Code Generator.
import Foundation
import azureSwiftRuntime
internal struct ScheduleCreateOrUpdatePropertiesData : ScheduleCreateOrUpdatePropertiesProtocol {
    public var description: String?
    public var startTime: Date
    public var expiryTime: Date?
    public var interval: [String: String?]?
    public var frequency: ScheduleFrequencyEnum
    public var timeZone: String?
    public var advancedSchedule: AdvancedScheduleProtocol?

        enum CodingKeys: String, CodingKey {case description = "description"
        case startTime = "startTime"
        case expiryTime = "expiryTime"
        case interval = "interval"
        case frequency = "frequency"
        case timeZone = "timeZone"
        case advancedSchedule = "advancedSchedule"
        }

  public init(startTime: Date, frequency: ScheduleFrequencyEnum)  {
    self.startTime = startTime
    self.frequency = frequency
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.description) {
        self.description = try container.decode(String?.self, forKey: .description)
    }
        self.startTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .startTime)), format: .dateTime)!
    if container.contains(.expiryTime) {
        self.expiryTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .expiryTime)), format: .dateTime)
    }
    if container.contains(.interval) {
        self.interval = try container.decode([String: String?]?.self, forKey: .interval)
    }
    self.frequency = try container.decode(ScheduleFrequencyEnum.self, forKey: .frequency)
    if container.contains(.timeZone) {
        self.timeZone = try container.decode(String?.self, forKey: .timeZone)
    }
    if container.contains(.advancedSchedule) {
        self.advancedSchedule = try container.decode(AdvancedScheduleData?.self, forKey: .advancedSchedule)
    }
    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.description != nil {try container.encode(self.description, forKey: .description)}
    try container.encode(DateConverter.toString(date: self.startTime, format: .dateTime), forKey: .startTime)
    if self.expiryTime != nil {
        try container.encode(DateConverter.toString(date: self.expiryTime!, format: .dateTime), forKey: .expiryTime)
    }
    if self.interval != nil {try container.encode(self.interval, forKey: .interval)}
    try container.encode(self.frequency, forKey: .frequency)
    if self.timeZone != nil {try container.encode(self.timeZone, forKey: .timeZone)}
    if self.advancedSchedule != nil {try container.encode(self.advancedSchedule as! AdvancedScheduleData?, forKey: .advancedSchedule)}
  }
}

extension DataFactory {
  public static func createScheduleCreateOrUpdatePropertiesProtocol(startTime: Date, frequency: ScheduleFrequencyEnum) -> ScheduleCreateOrUpdatePropertiesProtocol {
    return ScheduleCreateOrUpdatePropertiesData(startTime: startTime, frequency: frequency)
  }
}


// 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 ScheduleData : ScheduleProtocol {
    public var id: String?
    public var name: String?
    public var type: String?
    public var properties: SchedulePropertiesProtocol?

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

extension DataFactory {
  public static func createScheduleProtocol() -> ScheduleProtocol {
    return ScheduleData()
  }
}


// ScheduleDay enumerates the values for schedule day.

// 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 ScheduleDayEnum: String, Codable
{
// Friday specifies the friday state for schedule day.
    case Friday = "Friday"
// Monday specifies the monday state for schedule day.
    case Monday = "Monday"
// Saturday specifies the saturday state for schedule day.
    case Saturday = "Saturday"
// Sunday specifies the sunday state for schedule day.
    case Sunday = "Sunday"
// Thursday specifies the thursday state for schedule day.
    case Thursday = "Thursday"
// Tuesday specifies the tuesday state for schedule day.
    case Tuesday = "Tuesday"
// Wednesday specifies the wednesday state for schedule day.
    case Wednesday = "Wednesday"
}


// ScheduleFrequency enumerates the values for schedule frequency.

// 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 ScheduleFrequencyEnum: String, Codable
{
// Day specifies the day state for schedule frequency.
    case Day = "Day"
// Hour specifies the hour state for schedule frequency.
    case Hour = "Hour"
// Month specifies the month state for schedule frequency.
    case Month = "Month"
// OneTime specifies the one time state for schedule frequency.
    case OneTime = "OneTime"
// Week specifies the week state for schedule frequency.
    case Week = "Week"
}


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

extension DataFactory {
  public static func createScheduleListResultProtocol() -> ScheduleListResultProtocol {
    return ScheduleListResultData()
  }
}


// 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 SchedulePropertiesData : SchedulePropertiesProtocol {
    public var startTime: Date?
    public var startTimeOffsetMinutes: Double?
    public var expiryTime: Date?
    public var expiryTimeOffsetMinutes: Double?
    public var isEnabled: Bool?
    public var nextRun: Date?
    public var nextRunOffsetMinutes: Double?
    public var interval: [String: String?]?
    public var frequency: ScheduleFrequencyEnum?
    public var timeZone: String?
    public var advancedSchedule: AdvancedScheduleProtocol?
    public var creationTime: Date?
    public var lastModifiedTime: Date?
    public var description: String?

        enum CodingKeys: String, CodingKey {case startTime = "startTime"
        case startTimeOffsetMinutes = "startTimeOffsetMinutes"
        case expiryTime = "expiryTime"
        case expiryTimeOffsetMinutes = "expiryTimeOffsetMinutes"
        case isEnabled = "isEnabled"
        case nextRun = "nextRun"
        case nextRunOffsetMinutes = "nextRunOffsetMinutes"
        case interval = "interval"
        case frequency = "frequency"
        case timeZone = "timeZone"
        case advancedSchedule = "advancedSchedule"
        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(.startTime) {
        self.startTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .startTime)), format: .dateTime)
    }
    if container.contains(.startTimeOffsetMinutes) {
        self.startTimeOffsetMinutes = try container.decode(Double?.self, forKey: .startTimeOffsetMinutes)
    }
    if container.contains(.expiryTime) {
        self.expiryTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .expiryTime)), format: .dateTime)
    }
    if container.contains(.expiryTimeOffsetMinutes) {
        self.expiryTimeOffsetMinutes = try container.decode(Double?.self, forKey: .expiryTimeOffsetMinutes)
    }
    if container.contains(.isEnabled) {
        self.isEnabled = try container.decode(Bool?.self, forKey: .isEnabled)
    }
    if container.contains(.nextRun) {
        self.nextRun = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .nextRun)), format: .dateTime)
    }
    if container.contains(.nextRunOffsetMinutes) {
        self.nextRunOffsetMinutes = try container.decode(Double?.self, forKey: .nextRunOffsetMinutes)
    }
    if container.contains(.interval) {
        self.interval = try container.decode([String: String?]?.self, forKey: .interval)
    }
    if container.contains(.frequency) {
        self.frequency = try container.decode(ScheduleFrequencyEnum?.self, forKey: .frequency)
    }
    if container.contains(.timeZone) {
        self.timeZone = try container.decode(String?.self, forKey: .timeZone)
    }
    if container.contains(.advancedSchedule) {
        self.advancedSchedule = try container.decode(AdvancedScheduleData?.self, forKey: .advancedSchedule)
    }
    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.startTime != nil {
        try container.encode(DateConverter.toString(date: self.startTime!, format: .dateTime), forKey: .startTime)
    }
    if self.startTimeOffsetMinutes != nil {try container.encode(self.startTimeOffsetMinutes, forKey: .startTimeOffsetMinutes)}
    if self.expiryTime != nil {
        try container.encode(DateConverter.toString(date: self.expiryTime!, format: .dateTime), forKey: .expiryTime)
    }
    if self.expiryTimeOffsetMinutes != nil {try container.encode(self.expiryTimeOffsetMinutes, forKey: .expiryTimeOffsetMinutes)}
    if self.isEnabled != nil {try container.encode(self.isEnabled, forKey: .isEnabled)}
    if self.nextRun != nil {
        try container.encode(DateConverter.toString(date: self.nextRun!, format: .dateTime), forKey: .nextRun)
    }
    if self.nextRunOffsetMinutes != nil {try container.encode(self.nextRunOffsetMinutes, forKey: .nextRunOffsetMinutes)}
    if self.interval != nil {try container.encode(self.interval, forKey: .interval)}
    if self.frequency != nil {try container.encode(self.frequency, forKey: .frequency)}
    if self.timeZone != nil {try container.encode(self.timeZone, forKey: .timeZone)}
    if self.advancedSchedule != nil {try container.encode(self.advancedSchedule as! AdvancedScheduleData?, forKey: .advancedSchedule)}
    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 createSchedulePropertiesProtocol() -> SchedulePropertiesProtocol {
    return SchedulePropertiesData()
  }
}


// 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 ScheduleUpdateParametersData : ScheduleUpdateParametersProtocol {
    public var name: String?
    public var properties: ScheduleUpdatePropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createScheduleUpdateParametersProtocol() -> ScheduleUpdateParametersProtocol {
    return ScheduleUpdateParametersData()
  }
}


// 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 ScheduleUpdatePropertiesData : ScheduleUpdatePropertiesProtocol {
    public var description: String?
    public var isEnabled: Bool?

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

  public init()  {
  }

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

extension DataFactory {
  public static func createScheduleUpdatePropertiesProtocol() -> ScheduleUpdatePropertiesProtocol {
    return ScheduleUpdatePropertiesData()
  }
}


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

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

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

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

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

extension DataFactory {
  public static func createSkuProtocol(name: SkuNameEnumEnum) -> SkuProtocol {
    return SkuData(name: name)
  }
}


// SkuNameEnum enumerates the values for sku name enum.

// 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 SkuNameEnumEnum: String, Codable
{
// Basic specifies the basic state for sku name enum.
    case Basic = "Basic"
// Free specifies the free state for sku name enum.
    case Free = "Free"
}


// 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 SoftwareUpdateConfigurationCollectionItemData : SoftwareUpdateConfigurationCollectionItemProtocol {
    public var name: String?
    public var id: String?
    public var properties: SoftwareUpdateConfigurationCollectionItemPropertiesProtocol

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

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

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

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

extension DataFactory {
  public static func createSoftwareUpdateConfigurationCollectionItemProtocol(properties: SoftwareUpdateConfigurationCollectionItemPropertiesProtocol) -> SoftwareUpdateConfigurationCollectionItemProtocol {
    return SoftwareUpdateConfigurationCollectionItemData(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 SoftwareUpdateConfigurationCollectionItemPropertiesData : SoftwareUpdateConfigurationCollectionItemPropertiesProtocol {
    public var updateConfiguration: CollectionItemUpdateConfigurationProtocol?
    public var frequency: ScheduleFrequencyEnum?
    public var startTime: Date?
    public var creationTime: Date?
    public var lastModifiedTime: Date?
    public var provisioningState: String?
    public var nextRun: Date?

        enum CodingKeys: String, CodingKey {case updateConfiguration = "updateConfiguration"
        case frequency = "frequency"
        case startTime = "startTime"
        case creationTime = "creationTime"
        case lastModifiedTime = "lastModifiedTime"
        case provisioningState = "provisioningState"
        case nextRun = "nextRun"
        }

  public init()  {
  }

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

extension DataFactory {
  public static func createSoftwareUpdateConfigurationCollectionItemPropertiesProtocol() -> SoftwareUpdateConfigurationCollectionItemPropertiesProtocol {
    return SoftwareUpdateConfigurationCollectionItemPropertiesData()
  }
}


// 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 SoftwareUpdateConfigurationData : SoftwareUpdateConfigurationProtocol {
    public var name: String?
    public var id: String?
    public var type: String?
    public var properties: SoftwareUpdateConfigurationPropertiesProtocol

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

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

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

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

extension DataFactory {
  public static func createSoftwareUpdateConfigurationProtocol(properties: SoftwareUpdateConfigurationPropertiesProtocol) -> SoftwareUpdateConfigurationProtocol {
    return SoftwareUpdateConfigurationData(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 SoftwareUpdateConfigurationListResultData : SoftwareUpdateConfigurationListResultProtocol {
    public var value: [SoftwareUpdateConfigurationCollectionItemProtocol?]?

        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([SoftwareUpdateConfigurationCollectionItemData?]?.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! [SoftwareUpdateConfigurationCollectionItemData?]?, forKey: .value)}
  }
}

extension DataFactory {
  public static func createSoftwareUpdateConfigurationListResultProtocol() -> SoftwareUpdateConfigurationListResultProtocol {
    return SoftwareUpdateConfigurationListResultData()
  }
}


// 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 SoftwareUpdateConfigurationMachineRunData : SoftwareUpdateConfigurationMachineRunProtocol {
    public var name: String?
    public var id: String?
    public var properties: UpdateConfigurationMachineRunPropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createSoftwareUpdateConfigurationMachineRunProtocol() -> SoftwareUpdateConfigurationMachineRunProtocol {
    return SoftwareUpdateConfigurationMachineRunData()
  }
}


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

extension DataFactory {
  public static func createSoftwareUpdateConfigurationMachineRunListResultProtocol() -> SoftwareUpdateConfigurationMachineRunListResultProtocol {
    return SoftwareUpdateConfigurationMachineRunListResultData()
  }
}


// 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 SoftwareUpdateConfigurationPropertiesData : SoftwareUpdateConfigurationPropertiesProtocol {
    public var updateConfiguration: UpdateConfigurationProtocol
    public var scheduleInfo: SchedulePropertiesProtocol
    public var provisioningState: String?
    public var error: ErrorResponseProtocol?
    public var creationTime: Date?
    public var createdBy: String?
    public var lastModifiedTime: Date?
    public var lastModifiedBy: String?

        enum CodingKeys: String, CodingKey {case updateConfiguration = "updateConfiguration"
        case scheduleInfo = "scheduleInfo"
        case provisioningState = "provisioningState"
        case error = "error"
        case creationTime = "creationTime"
        case createdBy = "createdBy"
        case lastModifiedTime = "lastModifiedTime"
        case lastModifiedBy = "lastModifiedBy"
        }

  public init(updateConfiguration: UpdateConfigurationProtocol, scheduleInfo: SchedulePropertiesProtocol)  {
    self.updateConfiguration = updateConfiguration
    self.scheduleInfo = scheduleInfo
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      self.updateConfiguration = try container.decode(UpdateConfigurationData.self, forKey: .updateConfiguration)
    self.scheduleInfo = try container.decode(SchedulePropertiesData.self, forKey: .scheduleInfo)
    if container.contains(.provisioningState) {
        self.provisioningState = try container.decode(String?.self, forKey: .provisioningState)
    }
    if container.contains(.error) {
        self.error = try container.decode(ErrorResponseData?.self, forKey: .error)
    }
    if container.contains(.creationTime) {
        self.creationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .creationTime)), format: .dateTime)
    }
    if container.contains(.createdBy) {
        self.createdBy = try container.decode(String?.self, forKey: .createdBy)
    }
    if container.contains(.lastModifiedTime) {
        self.lastModifiedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastModifiedTime)), format: .dateTime)
    }
    if container.contains(.lastModifiedBy) {
        self.lastModifiedBy = try container.decode(String?.self, forKey: .lastModifiedBy)
    }
    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.updateConfiguration as! UpdateConfigurationData, forKey: .updateConfiguration)
    try container.encode(self.scheduleInfo as! SchedulePropertiesData, forKey: .scheduleInfo)
    if self.provisioningState != nil {try container.encode(self.provisioningState, forKey: .provisioningState)}
    if self.error != nil {try container.encode(self.error as! ErrorResponseData?, forKey: .error)}
    if self.creationTime != nil {
        try container.encode(DateConverter.toString(date: self.creationTime!, format: .dateTime), forKey: .creationTime)
    }
    if self.createdBy != nil {try container.encode(self.createdBy, forKey: .createdBy)}
    if self.lastModifiedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastModifiedTime!, format: .dateTime), forKey: .lastModifiedTime)
    }
    if self.lastModifiedBy != nil {try container.encode(self.lastModifiedBy, forKey: .lastModifiedBy)}
  }
}

extension DataFactory {
  public static func createSoftwareUpdateConfigurationPropertiesProtocol(updateConfiguration: UpdateConfigurationProtocol, scheduleInfo: SchedulePropertiesProtocol) -> SoftwareUpdateConfigurationPropertiesProtocol {
    return SoftwareUpdateConfigurationPropertiesData(updateConfiguration: updateConfiguration, scheduleInfo: scheduleInfo)
  }
}


// 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 SoftwareUpdateConfigurationRunData : SoftwareUpdateConfigurationRunProtocol {
    public var name: String?
    public var id: String?
    public var properties: SoftwareUpdateConfigurationRunPropertiesProtocol?

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

  public init()  {
  }

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

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

extension DataFactory {
  public static func createSoftwareUpdateConfigurationRunProtocol() -> SoftwareUpdateConfigurationRunProtocol {
    return SoftwareUpdateConfigurationRunData()
  }
}


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

extension DataFactory {
  public static func createSoftwareUpdateConfigurationRunListResultProtocol() -> SoftwareUpdateConfigurationRunListResultProtocol {
    return SoftwareUpdateConfigurationRunListResultData()
  }
}


// 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 SoftwareUpdateConfigurationRunPropertiesData : SoftwareUpdateConfigurationRunPropertiesProtocol {
    public var softwareUpdateConfiguration: UpdateConfigurationNavigationProtocol?
    public var status: String?
    public var configuredDuration: String?
    public var osType: String?
    public var startTime: Date?
    public var endTime: Date?
    public var computerCount: Int32?
    public var failedCount: Int32?
    public var creationTime: Date?
    public var createdBy: String?
    public var lastModifiedTime: Date?
    public var lastModifiedBy: String?

        enum CodingKeys: String, CodingKey {case softwareUpdateConfiguration = "softwareUpdateConfiguration"
        case status = "status"
        case configuredDuration = "configuredDuration"
        case osType = "osType"
        case startTime = "startTime"
        case endTime = "endTime"
        case computerCount = "computerCount"
        case failedCount = "failedCount"
        case creationTime = "creationTime"
        case createdBy = "createdBy"
        case lastModifiedTime = "lastModifiedTime"
        case lastModifiedBy = "lastModifiedBy"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.softwareUpdateConfiguration) {
        self.softwareUpdateConfiguration = try container.decode(UpdateConfigurationNavigationData?.self, forKey: .softwareUpdateConfiguration)
    }
    if container.contains(.status) {
        self.status = try container.decode(String?.self, forKey: .status)
    }
    if container.contains(.configuredDuration) {
        self.configuredDuration = try container.decode(String?.self, forKey: .configuredDuration)
    }
    if container.contains(.osType) {
        self.osType = try container.decode(String?.self, forKey: .osType)
    }
    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(.computerCount) {
        self.computerCount = try container.decode(Int32?.self, forKey: .computerCount)
    }
    if container.contains(.failedCount) {
        self.failedCount = try container.decode(Int32?.self, forKey: .failedCount)
    }
    if container.contains(.creationTime) {
        self.creationTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .creationTime)), format: .dateTime)
    }
    if container.contains(.createdBy) {
        self.createdBy = try container.decode(String?.self, forKey: .createdBy)
    }
    if container.contains(.lastModifiedTime) {
        self.lastModifiedTime = DateConverter.fromString(dateStr: (try container.decode(String?.self, forKey: .lastModifiedTime)), format: .dateTime)
    }
    if container.contains(.lastModifiedBy) {
        self.lastModifiedBy = try container.decode(String?.self, forKey: .lastModifiedBy)
    }
    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.softwareUpdateConfiguration != nil {try container.encode(self.softwareUpdateConfiguration as! UpdateConfigurationNavigationData?, forKey: .softwareUpdateConfiguration)}
    if self.status != nil {try container.encode(self.status, forKey: .status)}
    if self.configuredDuration != nil {try container.encode(self.configuredDuration, forKey: .configuredDuration)}
    if self.osType != nil {try container.encode(self.osType, forKey: .osType)}
    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.computerCount != nil {try container.encode(self.computerCount, forKey: .computerCount)}
    if self.failedCount != nil {try container.encode(self.failedCount, forKey: .failedCount)}
    if self.creationTime != nil {
        try container.encode(DateConverter.toString(date: self.creationTime!, format: .dateTime), forKey: .creationTime)
    }
    if self.createdBy != nil {try container.encode(self.createdBy, forKey: .createdBy)}
    if self.lastModifiedTime != nil {
        try container.encode(DateConverter.toString(date: self.lastModifiedTime!, format: .dateTime), forKey: .lastModifiedTime)
    }
    if self.lastModifiedBy != nil {try container.encode(self.lastModifiedBy, forKey: .lastModifiedBy)}
  }
}

extension DataFactory {
  public static func createSoftwareUpdateConfigurationRunPropertiesProtocol() -> SoftwareUpdateConfigurationRunPropertiesProtocol {
    return SoftwareUpdateConfigurationRunPropertiesData()
  }
}


// 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 SourceControlCreateOrUpdateParametersData : SourceControlCreateOrUpdateParametersProtocol {
    public var properties: SourceControlCreateOrUpdatePropertiesProtocol

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

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

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

extension DataFactory {
  public static func createSourceControlCreateOrUpdateParametersProtocol(properties: SourceControlCreateOrUpdatePropertiesProtocol) -> SourceControlCreateOrUpdateParametersProtocol {
    return SourceControlCreateOrUpdateParametersData(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 SourceControlCreateOrUpdatePropertiesData : SourceControlCreateOrUpdatePropertiesProtocol {
    public var repoUrl: String?
    public var branch: String?
    public var folderPath: String?
    public var autoSync: Bool?
    public var publishRunbook: Bool?
    public var sourceType: SourceTypeEnum?
    public var securityToken: String?
    public var description: String?

        enum CodingKeys: String, CodingKey {case repoUrl = "repoUrl"
        case branch = "branch"
        case folderPath = "folderPath"
        case autoSync = "autoSync"
        case publishRunbook = "publishRunbook"
        case sourceType = "sourceType"
        case securityToken = "securityToken"
        case description = "description"
        }

  public init()  {
  }

  public init(from decoder: Decoder) throws {
    let container = try decoder.container(keyedBy: CodingKeys.self)
      if container.contains(.repoUrl) {
        self.repoUrl = try container.decode(String?.self, forKey: .repoUrl)
    }
    if container.contains(.branch) {
        self.branch = try container.decode(String?.self, forKey: .branch)
    }
    if container.contains(.folderPath) {
        self.folderPath = try container.decode(String?.self, forKey: .folderPath)
    }
    if container.contains(.autoSync) {
        self.autoSync = try container.decode(Bool?.self, forKey: .autoSync)
    }
    if container.contains(.publishRunbook) {
        self.publishRunbook = try container.decode(Bool?.self, forKey: .publishRunbook)
    }
    if container.contains(.sourceType) {
        self.sourceType = try container.decode(SourceTypeEnum?.self, forKey: .sourceType)
    }
    if container.contains(.securityToken) {
        self.securityToken = try container.decode(String?.self, forKey: .securityToken)
    }
    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.repoUrl != nil {try container.encode(self.repoUrl, forKey: .repoUrl)}
    if self.branch != nil {try container.encode(self.branch, forKey: .branch)}
    if self.folderPath != nil {try container.encode(self.folderPath, forKey: .folderPath)}
    if self.autoSync != nil {try container.encode(self.autoSync, forKey: .autoSync)}
    if self.publishRunbook != nil {try container.encode(self.publishRunbook, forKey: .publishRunbook)}
    if self.sourceType != nil {try container.encode(self.sourceType, forKey: .sourceType)}
    if self.securityToken != nil {try container.encode(self.securityToken, forKey: .securityToken)}
    if self.description != nil {try container.encode(self.description, forKey: .description)}
  }
}

extension DataFactory {
  public static func createSourceControlCreateOrUpdatePropertiesProtocol() -> SourceControlCreateOrUpdatePropertiesProtocol {
    return SourceControlCreateOrUpdatePropertiesData()
  }
}


// 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 SourceControlData : SourceControlProtocol {
    public var name: String?
    public var id: String?
    public var type: String?
    public var properties: SourceControlPropertiesProtocol?

        enum CodingKeys: String, CodingKey {case name = "name"
        case id = "id"
        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(.name) {
        self.name = try container.decode(String?.self, forKey: .name)
    }
    if container.contains(.id) {
        self.id = try container.decode(String?.self, forKey: .id)
    }
    if container.contains(.type) {
        self.type = try container.decode(String?.self, forKey: .type)
    }
    if container.contains(.properties) {
        self.properties = try container.decode(SourceControlPropertiesData?.self, forKey: .properties)
    }
    if var pageDecoder = decoder as? PageDecoder  {
      if pageDecoder.isPagedData,
        let nextLinkName = pageDecoder.nextLinkName {
          pageDecoder.nextLink = try UnknownCodingKey.decodeStringForKey(decoder: decoder, keyForDecode: nextLinkName)
      }
    }
  }

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

extension DataFactory {
  public static func createSourceControlProtocol() -> SourceControlProtocol {
    return SourceControlData()
  }
}


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

extension DataFactory {
  public static func createSourceControlListResultProtocol() -> SourceControlListResultProtocol {
    return SourceControlListResultData()
  }
}