-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #164 from decentralised-dataexchange/feature/157-E…
…xpose-show-data-agreement-policy-screen Feature/157 expose show data agreement policy screen
- Loading branch information
Showing
7 changed files
with
175 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
116 changes: 116 additions & 0 deletions
116
PrivacyDashboardiOS/Classes/Model/Organisation/DAPolicy.swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
// | ||
// DAPolicy.swift | ||
// PrivacyDashboardiOS | ||
// | ||
// Created by Mumthasir mohammed on 15/11/23. | ||
// | ||
|
||
import Foundation | ||
// MARK: - DataAgreementPolicy | ||
class DAPolicy: Codable { | ||
var forgettable: Bool? | ||
var policy: Policy? | ||
var purpose, lifecycle, purposeDescription: String? | ||
var dataAttributes: [DataAttributeInPolicy]? | ||
var compatibleWithVersionID, controllerName: String? | ||
var signature: Signature? | ||
var id, controllerID, lawfulBasis, version: String? | ||
var methodOfUse, dpiaDate: String? | ||
var active: Bool? | ||
var dpiaSummaryURL: String? | ||
var controllerURL: String? | ||
|
||
enum CodingKeys: String, CodingKey { | ||
case forgettable, policy, purpose, lifecycle, purposeDescription, dataAttributes | ||
case compatibleWithVersionID | ||
case controllerName, signature, id | ||
case controllerID | ||
case lawfulBasis, version, methodOfUse, dpiaDate, active | ||
case dpiaSummaryURL | ||
case controllerURL | ||
} | ||
|
||
init(forgettable: Bool?, policy: Policy?, purpose: String?, lifecycle: String?, purposeDescription: String?, dataAttributes: [DataAttributeInPolicy]?, compatibleWithVersionID: String?, controllerName: String?, signature: Signature?, id: String?, controllerID: String?, lawfulBasis: String?, version: String?, methodOfUse: String?, dpiaDate: String?, active: Bool?, dpiaSummaryURL: String?, controllerURL: String?) { | ||
self.forgettable = forgettable | ||
self.policy = policy | ||
self.purpose = purpose | ||
self.lifecycle = lifecycle | ||
self.purposeDescription = purposeDescription | ||
self.dataAttributes = dataAttributes | ||
self.compatibleWithVersionID = compatibleWithVersionID | ||
self.controllerName = controllerName | ||
self.signature = signature | ||
self.id = id | ||
self.controllerID = controllerID | ||
self.lawfulBasis = lawfulBasis | ||
self.version = version | ||
self.methodOfUse = methodOfUse | ||
self.dpiaDate = dpiaDate | ||
self.active = active | ||
self.dpiaSummaryURL = dpiaSummaryURL | ||
self.controllerURL = controllerURL | ||
} | ||
} | ||
|
||
// MARK: - DataAttribute | ||
class DataAttributeInPolicy: Codable { | ||
var category, id, description: String? | ||
var sensitivity: Bool? | ||
var name: String? | ||
|
||
init(category: String?, id: String?, description: String?, sensitivity: Bool?, name: String?) { | ||
self.category = category | ||
self.id = id | ||
self.description = description | ||
self.sensitivity = sensitivity | ||
self.name = name | ||
} | ||
} | ||
|
||
// MARK: - Policy | ||
class Policy: Codable { | ||
var url: String? | ||
var dataRetentionPeriodDays: Int? | ||
var version, id, industrySector, geographicRestriction: String? | ||
var thirdPartyDataSharing: Bool? | ||
var jurisdiction, storageLocation, name: String? | ||
|
||
init(url: String?, dataRetentionPeriodDays: Int?, version: String?, id: String?, industrySector: String?, geographicRestriction: String?, thirdPartyDataSharing: Bool?, jurisdiction: String?, storageLocation: String?, name: String?) { | ||
self.url = url | ||
self.dataRetentionPeriodDays = dataRetentionPeriodDays | ||
self.version = version | ||
self.id = id | ||
self.industrySector = industrySector | ||
self.geographicRestriction = geographicRestriction | ||
self.thirdPartyDataSharing = thirdPartyDataSharing | ||
self.jurisdiction = jurisdiction | ||
self.storageLocation = storageLocation | ||
self.name = name | ||
} | ||
} | ||
|
||
// MARK: - Signature | ||
class Signature: Codable { | ||
var id: String? | ||
var signedWithoutObjectReference: Bool? | ||
var verificationMethod, verificationPayload, payload, timestamp: String? | ||
var objectType, verificationPayloadHash, objectReference, signature: String? | ||
var verificationJwsHeader, verificationSignedAs, verificationSignedBy, verificationArtifact: String? | ||
|
||
init(id: String?, signedWithoutObjectReference: Bool?, verificationMethod: String?, verificationPayload: String?, payload: String?, timestamp: String?, objectType: String?, verificationPayloadHash: String?, objectReference: String?, signature: String?, verificationJwsHeader: String?, verificationSignedAs: String?, verificationSignedBy: String?, verificationArtifact: String?) { | ||
self.id = id | ||
self.signedWithoutObjectReference = signedWithoutObjectReference | ||
self.verificationMethod = verificationMethod | ||
self.verificationPayload = verificationPayload | ||
self.payload = payload | ||
self.timestamp = timestamp | ||
self.objectType = objectType | ||
self.verificationPayloadHash = verificationPayloadHash | ||
self.objectReference = objectReference | ||
self.signature = signature | ||
self.verificationJwsHeader = verificationJwsHeader | ||
self.verificationSignedAs = verificationSignedAs | ||
self.verificationSignedBy = verificationSignedBy | ||
self.verificationArtifact = verificationArtifact | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
PrivacyDashboardiOS/Example/Pods/Pods.xcodeproj/project.pbxproj
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters