// autogenerated

// swiftlint:disable all
import Foundation

public struct Profile: Hashable, Codable {
    public var id: String

    public var type: `Type`

    public var attributes: Attributes?

    public var relationships: Relationships?

    public var links: ResourceLinks

    public init(
        id: String,
        type: `Type`,
        attributes: Attributes? = nil,
        relationships: Relationships? = nil,
        links: ResourceLinks
    ) {
        self.id = id
        self.type = type
        self.attributes = attributes
        self.relationships = relationships
        self.links = links
    }

    private enum CodingKeys: String, CodingKey {
        case id
        case type
        case attributes
        case relationships
        case links
    }

    public enum `Type`: String, Hashable, Codable {
        case profiles
    }

    public struct Attributes: Hashable, Codable {
        public var createdDate: String?

        public var expirationDate: String?

        public var name: String?

        public var platform: BundleIdPlatform?

        public var profileContent: String?

        public var profileState: ProfileState?

        public var profileType: ProfileType?

        public var uuid: String?

        public init(
            createdDate: String? = nil,
            expirationDate: String? = nil,
            name: String? = nil,
            platform: BundleIdPlatform? = nil,
            profileContent: String? = nil,
            profileState: ProfileState? = nil,
            profileType: ProfileType? = nil,
            uuid: String? = nil
        ) {
            self.createdDate = createdDate
            self.expirationDate = expirationDate
            self.name = name
            self.platform = platform
            self.profileContent = profileContent
            self.profileState = profileState
            self.profileType = profileType
            self.uuid = uuid
        }

        private enum CodingKeys: String, CodingKey {
            case createdDate
            case expirationDate
            case name
            case platform
            case profileContent
            case profileState
            case profileType
            case uuid
        }

        public enum ProfileState: Hashable, Codable, RawRepresentable {
            case active
            case invalid
            case unknown(String)

            public var rawValue: String {
                switch self {
                case .active: return "ACTIVE"
                case .invalid: return "INVALID"
                case .unknown(let rawValue): return rawValue
                }
            }

            public init(rawValue: String) {
                switch rawValue {
                case "ACTIVE": self = .active
                case "INVALID": self = .invalid
                default: self = .unknown(rawValue)
                }
            }
        }

        public enum ProfileType: Hashable, Codable, RawRepresentable {
            case iOSAppAdhoc
            case iOSAppDevelopment
            case iOSAppInhouse
            case iOSAppStore
            case macAppDevelopment
            case macAppDirect
            case macAppStore
            case macCatalystAppDevelopment
            case macCatalystAppDirect
            case macCatalystAppStore
            case tvOSAppAdhoc
            case tvOSAppDevelopment
            case tvOSAppInhouse
            case tvOSAppStore
            case unknown(String)

            public var rawValue: String {
                switch self {
                case .iOSAppAdhoc: return "IOS_APP_ADHOC"
                case .iOSAppDevelopment: return "IOS_APP_DEVELOPMENT"
                case .iOSAppInhouse: return "IOS_APP_INHOUSE"
                case .iOSAppStore: return "IOS_APP_STORE"
                case .macAppDevelopment: return "MAC_APP_DEVELOPMENT"
                case .macAppDirect: return "MAC_APP_DIRECT"
                case .macAppStore: return "MAC_APP_STORE"
                case .macCatalystAppDevelopment: return "MAC_CATALYST_APP_DEVELOPMENT"
                case .macCatalystAppDirect: return "MAC_CATALYST_APP_DIRECT"
                case .macCatalystAppStore: return "MAC_CATALYST_APP_STORE"
                case .tvOSAppAdhoc: return "TVOS_APP_ADHOC"
                case .tvOSAppDevelopment: return "TVOS_APP_DEVELOPMENT"
                case .tvOSAppInhouse: return "TVOS_APP_INHOUSE"
                case .tvOSAppStore: return "TVOS_APP_STORE"
                case .unknown(let rawValue): return rawValue
                }
            }

            public init(rawValue: String) {
                switch rawValue {
                case "IOS_APP_ADHOC": self = .iOSAppAdhoc
                case "IOS_APP_DEVELOPMENT": self = .iOSAppDevelopment
                case "IOS_APP_INHOUSE": self = .iOSAppInhouse
                case "IOS_APP_STORE": self = .iOSAppStore
                case "MAC_APP_DEVELOPMENT": self = .macAppDevelopment
                case "MAC_APP_DIRECT": self = .macAppDirect
                case "MAC_APP_STORE": self = .macAppStore
                case "MAC_CATALYST_APP_DEVELOPMENT": self = .macCatalystAppDevelopment
                case "MAC_CATALYST_APP_DIRECT": self = .macCatalystAppDirect
                case "MAC_CATALYST_APP_STORE": self = .macCatalystAppStore
                case "TVOS_APP_ADHOC": self = .tvOSAppAdhoc
                case "TVOS_APP_DEVELOPMENT": self = .tvOSAppDevelopment
                case "TVOS_APP_INHOUSE": self = .tvOSAppInhouse
                case "TVOS_APP_STORE": self = .tvOSAppStore
                default: self = .unknown(rawValue)
                }
            }
        }
    }

    public struct Relationships: Hashable, Codable {
        public var bundleId: BundleId?

        public var certificates: Certificates?

        public var devices: Devices?

        public init(
            bundleId: BundleId? = nil,
            certificates: Certificates? = nil,
            devices: Devices? = nil
        ) {
            self.bundleId = bundleId
            self.certificates = certificates
            self.devices = devices
        }

        private enum CodingKeys: String, CodingKey {
            case bundleId
            case certificates
            case devices
        }

        public struct BundleId: Hashable, Codable {
            public var data: Data?

            public var links: Links?

            public init(
                data: Data? = nil,
                links: Links? = nil
            ) {
                self.data = data
                self.links = links
            }

            private enum CodingKeys: String, CodingKey {
                case data
                case links
            }

            public struct Data: Hashable, Codable {
                public var id: String

                public var type: `Type`

                public init(
                    id: String,
                    type: `Type`
                ) {
                    self.id = id
                    self.type = type
                }

                private enum CodingKeys: String, CodingKey {
                    case id
                    case type
                }

                public enum `Type`: String, Hashable, Codable {
                    case bundleIds
                }
            }

            public struct Links: Hashable, Codable {
                public var related: URL?

                public var `self`: URL?

                public init(
                    related: URL? = nil,
                    self _self: URL? = nil
                ) {
                    self.related = related
                    self.`self` = _self
                }

                private enum CodingKeys: String, CodingKey {
                    case related
                    case `self` = "self"
                }
            }
        }

        public struct Certificates: Hashable, Codable {
            public var data: [Data]?

            public var links: Links?

            public var meta: PagingInformation?

            public init(
                data: [Data]? = nil,
                links: Links? = nil,
                meta: PagingInformation? = nil
            ) {
                self.data = data
                self.links = links
                self.meta = meta
            }

            private enum CodingKeys: String, CodingKey {
                case data
                case links
                case meta
            }

            public struct Data: Hashable, Codable {
                public var id: String

                public var type: `Type`

                public init(
                    id: String,
                    type: `Type`
                ) {
                    self.id = id
                    self.type = type
                }

                private enum CodingKeys: String, CodingKey {
                    case id
                    case type
                }

                public enum `Type`: String, Hashable, Codable {
                    case certificates
                }
            }

            public struct Links: Hashable, Codable {
                public var related: URL?

                public var `self`: URL?

                public init(
                    related: URL? = nil,
                    self _self: URL? = nil
                ) {
                    self.related = related
                    self.`self` = _self
                }

                private enum CodingKeys: String, CodingKey {
                    case related
                    case `self` = "self"
                }
            }
        }

        public struct Devices: Hashable, Codable {
            public var data: [Data]?

            public var links: Links?

            public var meta: PagingInformation?

            public init(
                data: [Data]? = nil,
                links: Links? = nil,
                meta: PagingInformation? = nil
            ) {
                self.data = data
                self.links = links
                self.meta = meta
            }

            private enum CodingKeys: String, CodingKey {
                case data
                case links
                case meta
            }

            public struct Data: Hashable, Codable {
                public var id: String

                public var type: `Type`

                public init(
                    id: String,
                    type: `Type`
                ) {
                    self.id = id
                    self.type = type
                }

                private enum CodingKeys: String, CodingKey {
                    case id
                    case type
                }

                public enum `Type`: String, Hashable, Codable {
                    case devices
                }
            }

            public struct Links: Hashable, Codable {
                public var related: URL?

                public var `self`: URL?

                public init(
                    related: URL? = nil,
                    self _self: URL? = nil
                ) {
                    self.related = related
                    self.`self` = _self
                }

                private enum CodingKeys: String, CodingKey {
                    case related
                    case `self` = "self"
                }
            }
        }
    }
}

// swiftlint:enable all
