Chilkat Online Tools

CreateFileSystemFromBackup Swift3 Example

Amazon FSx

func chilkatTest() {
    // This example requires the Chilkat API to have been previously unlocked.
    // See Global Unlock Sample for sample code.

    let rest = CkoRest()!
    var success: Bool

    let authAws = CkoAuthAws()!
    authAws.accessKey = "AWS_ACCESS_KEY"
    authAws.secretKey = "AWS_SECRET_KEY"

    // Don't forget to change the region to your particular region. (Also make the same change in the call to Connect below.)
    authAws.region = "us-west-2"
    authAws.serviceName = "fsx"
    // SetAuthAws causes Chilkat to automatically add the following headers: Authorization, X-Amz-Date
    rest.setAuthAws(authAws)

    // URL: https://fsx.us-west-2.amazonaws.com/
    // Use the same region as specified above.
    success = rest.connect("fsx.us-west-2.amazonaws.com", port: 443, tls: true, autoReconnect: true)
    if success != true {
        print("ConnectFailReason: \(rest.connectFailReason.intValue)")
        print("\(rest.lastErrorText!)")
        return
    }

    // The following code creates the JSON request body.
    // The JSON created by this code is shown below.

    // Use this online tool to generate code from sample JSON:
    // Generate Code to Create JSON

    let json = CkoJsonObject()!
    json.update("BackupId", value: "string")
    json.update("ClientRequestToken", value: "string")
    json.update("FileSystemTypeVersion", value: "string")
    json.update("KmsKeyId", value: "string")
    json.update("LustreConfiguration.AutoImportPolicy", value: "string")
    json.updateInt("LustreConfiguration.AutomaticBackupRetentionDays", value: 123)
    json.updateInt("LustreConfiguration.CopyTagsToBackups", value: 123)
    json.update("LustreConfiguration.DailyAutomaticBackupStartTime", value: "string")
    json.update("LustreConfiguration.DataCompressionType", value: "string")
    json.update("LustreConfiguration.DeploymentType", value: "string")
    json.update("LustreConfiguration.DriveCacheType", value: "string")
    json.update("LustreConfiguration.ExportPath", value: "string")
    json.updateInt("LustreConfiguration.ImportedFileChunkSize", value: 123)
    json.update("LustreConfiguration.ImportPath", value: "string")
    json.update("LustreConfiguration.LogConfiguration.Destination", value: "string")
    json.update("LustreConfiguration.LogConfiguration.Level", value: "string")
    json.updateInt("LustreConfiguration.PerUnitStorageThroughput", value: 123)
    json.update("LustreConfiguration.WeeklyMaintenanceStartTime", value: "string")
    json.updateInt("OpenZFSConfiguration.AutomaticBackupRetentionDays", value: 123)
    json.updateInt("OpenZFSConfiguration.CopyTagsToBackups", value: 123)
    json.updateInt("OpenZFSConfiguration.CopyTagsToVolumes", value: 123)
    json.update("OpenZFSConfiguration.DailyAutomaticBackupStartTime", value: "string")
    json.update("OpenZFSConfiguration.DeploymentType", value: "string")
    json.updateInt("OpenZFSConfiguration.DiskIopsConfiguration.Iops", value: 123)
    json.update("OpenZFSConfiguration.DiskIopsConfiguration.Mode", value: "string")
    json.updateInt("OpenZFSConfiguration.RootVolumeConfiguration.CopyTagsToSnapshots", value: 123)
    json.update("OpenZFSConfiguration.RootVolumeConfiguration.DataCompressionType", value: "string")
    json.update("OpenZFSConfiguration.RootVolumeConfiguration.NfsExports[0].ClientConfigurations[0].Clients", value: "string")
    json.update("OpenZFSConfiguration.RootVolumeConfiguration.NfsExports[0].ClientConfigurations[0].Options[0]", value: "string")
    json.updateInt("OpenZFSConfiguration.RootVolumeConfiguration.ReadOnly", value: 123)
    json.updateInt("OpenZFSConfiguration.RootVolumeConfiguration.RecordSizeKiB", value: 123)
    json.updateInt("OpenZFSConfiguration.RootVolumeConfiguration.UserAndGroupQuotas[0].Id", value: 123)
    json.updateInt("OpenZFSConfiguration.RootVolumeConfiguration.UserAndGroupQuotas[0].StorageCapacityQuotaGiB", value: 123)
    json.update("OpenZFSConfiguration.RootVolumeConfiguration.UserAndGroupQuotas[0].Type", value: "string")
    json.updateInt("OpenZFSConfiguration.ThroughputCapacity", value: 123)
    json.update("OpenZFSConfiguration.WeeklyMaintenanceStartTime", value: "string")
    json.update("SecurityGroupIds[0]", value: "string")
    json.update("StorageType", value: "string")
    json.update("SubnetIds[0]", value: "string")
    json.update("Tags[0].Key", value: "string")
    json.update("Tags[0].Value", value: "string")
    json.update("WindowsConfiguration.ActiveDirectoryId", value: "string")
    json.update("WindowsConfiguration.Aliases[0]", value: "string")
    json.update("WindowsConfiguration.AuditLogConfiguration.AuditLogDestination", value: "string")
    json.update("WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel", value: "string")
    json.update("WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel", value: "string")
    json.updateInt("WindowsConfiguration.AutomaticBackupRetentionDays", value: 123)
    json.updateInt("WindowsConfiguration.CopyTagsToBackups", value: 123)
    json.update("WindowsConfiguration.DailyAutomaticBackupStartTime", value: "string")
    json.update("WindowsConfiguration.DeploymentType", value: "string")
    json.update("WindowsConfiguration.PreferredSubnetId", value: "string")
    json.update("WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[0]", value: "string")
    json.update("WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName", value: "string")
    json.update("WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup", value: "string")
    json.update("WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName", value: "string")
    json.update("WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.Password", value: "string")
    json.update("WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName", value: "string")
    json.updateInt("WindowsConfiguration.ThroughputCapacity", value: 123)
    json.update("WindowsConfiguration.WeeklyMaintenanceStartTime", value: "string")

    // The JSON request body created by the above code:

    // {
    //   "BackupId": "string",
    //   "ClientRequestToken": "string",
    //   "FileSystemTypeVersion": "string",
    //   "KmsKeyId": "string",
    //   "LustreConfiguration": {
    //     "AutoImportPolicy": "string",
    //     "AutomaticBackupRetentionDays": number,
    //     "CopyTagsToBackups": boolean,
    //     "DailyAutomaticBackupStartTime": "string",
    //     "DataCompressionType": "string",
    //     "DeploymentType": "string",
    //     "DriveCacheType": "string",
    //     "ExportPath": "string",
    //     "ImportedFileChunkSize": number,
    //     "ImportPath": "string",
    //     "LogConfiguration": {
    //       "Destination": "string",
    //       "Level": "string"
    //     },
    //     "PerUnitStorageThroughput": number,
    //     "WeeklyMaintenanceStartTime": "string"
    //   },
    //   "OpenZFSConfiguration": {
    //     "AutomaticBackupRetentionDays": number,
    //     "CopyTagsToBackups": boolean,
    //     "CopyTagsToVolumes": boolean,
    //     "DailyAutomaticBackupStartTime": "string",
    //     "DeploymentType": "string",
    //     "DiskIopsConfiguration": {
    //       "Iops": number,
    //       "Mode": "string"
    //     },
    //     "RootVolumeConfiguration": {
    //       "CopyTagsToSnapshots": boolean,
    //       "DataCompressionType": "string",
    //       "NfsExports": [
    //         {
    //           "ClientConfigurations": [
    //             {
    //               "Clients": "string",
    //               "Options": [
    //                 "string"
    //               ]
    //             }
    //           ]
    //         }
    //       ],
    //       "ReadOnly": boolean,
    //       "RecordSizeKiB": number,
    //       "UserAndGroupQuotas": [
    //         {
    //           "Id": number,
    //           "StorageCapacityQuotaGiB": number,
    //           "Type": "string"
    //         }
    //       ]
    //     },
    //     "ThroughputCapacity": number,
    //     "WeeklyMaintenanceStartTime": "string"
    //   },
    //   "SecurityGroupIds": [
    //     "string"
    //   ],
    //   "StorageType": "string",
    //   "SubnetIds": [
    //     "string"
    //   ],
    //   "Tags": [
    //     {
    //       "Key": "string",
    //       "Value": "string"
    //     }
    //   ],
    //   "WindowsConfiguration": {
    //     "ActiveDirectoryId": "string",
    //     "Aliases": [
    //       "string"
    //     ],
    //     "AuditLogConfiguration": {
    //       "AuditLogDestination": "string",
    //       "FileAccessAuditLogLevel": "string",
    //       "FileShareAccessAuditLogLevel": "string"
    //     },
    //     "AutomaticBackupRetentionDays": number,
    //     "CopyTagsToBackups": boolean,
    //     "DailyAutomaticBackupStartTime": "string",
    //     "DeploymentType": "string",
    //     "PreferredSubnetId": "string",
    //     "SelfManagedActiveDirectoryConfiguration": {
    //       "DnsIps": [
    //         "string"
    //       ],
    //       "DomainName": "string",
    //       "FileSystemAdministratorsGroup": "string",
    //       "OrganizationalUnitDistinguishedName": "string",
    //       "Password": "string",
    //       "UserName": "string"
    //     },
    //     "ThroughputCapacity": number,
    //     "WeeklyMaintenanceStartTime": "string"
    //   }
    // }

    rest.addHeader("Content-Type", value: "application/x-amz-json-1.1")
    rest.addHeader("X-Amz-Target", value: "AWSSimbaAPIService_v20180301.CreateFileSystemFromBackup")

    let sbRequestBody = CkoStringBuilder()!
    json.emitSb(sbRequestBody)
    let sbResponseBody = CkoStringBuilder()!
    success = rest.fullRequestSb("POST", uriPath: "/", requestBody: sbRequestBody, responseBody: sbResponseBody)
    if success != true {
        print("\(rest.lastErrorText!)")
        return
    }

    var respStatusCode: Int = rest.responseStatusCode.intValue
    print("response status code = \(respStatusCode)")
    if respStatusCode != 200 {
        print("Response Header:")
        print("\(rest.responseHeader!)")
        print("Response Body:")
        print("\(sbResponseBody.getAsString()!)")
        return
    }

    let jResp = CkoJsonObject()!
    jResp.loadSb(sbResponseBody)

    // The following code parses the JSON response.
    // A sample JSON response is shown below the sample code.

    // Use this online tool to generate parsing code from sample JSON:
    // Generate Parsing Code from JSON

    var AdministrativeActionType: String?
    var ProgressPercent: Int
    var RequestTime: Int
    var Status: String?
    var TargetFileSystemValues: String?
    var TargetSnapshotValuesCreationTime: Int
    var TargetSnapshotValuesLifecycle: String?
    var LifecycleTransitionReasonMessage: String?
    var Name: String?
    var TargetSnapshotValuesResourceARN: String?
    var SnapshotId: String?
    var VolumeId: String?
    var TargetVolumeValuesCreationTime: Int
    var TargetVolumeValuesFileSystemId: String?
    var TargetVolumeValuesLifecycle: String?
    var TargetVolumeValuesName: String?
    var FlexCacheEndpointType: String?
    var JunctionPath: String?
    var OntapVolumeType: String?
    var SecurityStyle: String?
    var SizeInMegabytes: Int
    var StorageEfficiencyEnabled: Int
    var StorageVirtualMachineId: String?
    var StorageVirtualMachineRoot: Int
    var CoolingPeriod: Int
    var TieringPolicyName: String?
    var UUID: String?
    var CopyTagsToSnapshots: Int
    var OpenZFSConfigurationDataCompressionType: String?
    var CopyStrategy: String?
    var SnapshotARN: String?
    var ParentVolumeId: String?
    var ReadOnly: Int
    var RecordSizeKiB: Int
    var StorageCapacityQuotaGiB: Int
    var StorageCapacityReservationGiB: Int
    var VolumePath: String?
    var TargetVolumeValuesResourceARN: String?
    var TargetVolumeValuesVolumeId: String?
    var VolumeType: String?
    var j: Int
    var count_j: Int
    var strVal: String?
    var Key: String?
    var Value: String?
    var k: Int
    var count_k: Int
    var Clients: String?
    var json1: CkoJsonObject?
    var i1: Int
    var count_i1: Int
    var Id: Int
    var v_Type: String?

    var CreationTime: Int = jResp.int(of: "FileSystem.CreationTime").intValue
    var DNSName: String? = jResp.string(of: "FileSystem.DNSName")
    var Message: String? = jResp.string(of: "FileSystem.FailureDetails.Message")
    var FileSystemId: String? = jResp.string(of: "FileSystem.FileSystemId")
    var FileSystemType: String? = jResp.string(of: "FileSystem.FileSystemType")
    var FileSystemTypeVersion: String? = jResp.string(of: "FileSystem.FileSystemTypeVersion")
    var KmsKeyId: String? = jResp.string(of: "FileSystem.KmsKeyId")
    var Lifecycle: String? = jResp.string(of: "FileSystem.Lifecycle")
    var AutomaticBackupRetentionDays: Int = jResp.int(of: "FileSystem.LustreConfiguration.AutomaticBackupRetentionDays").intValue
    var CopyTagsToBackups: Int = jResp.int(of: "FileSystem.LustreConfiguration.CopyTagsToBackups").intValue
    var DailyAutomaticBackupStartTime: String? = jResp.string(of: "FileSystem.LustreConfiguration.DailyAutomaticBackupStartTime")
    var DataCompressionType: String? = jResp.string(of: "FileSystem.LustreConfiguration.DataCompressionType")
    var AutoImportPolicy: String? = jResp.string(of: "FileSystem.LustreConfiguration.DataRepositoryConfiguration.AutoImportPolicy")
    var ExportPath: String? = jResp.string(of: "FileSystem.LustreConfiguration.DataRepositoryConfiguration.ExportPath")
    var FailureDetailsMessage: String? = jResp.string(of: "FileSystem.LustreConfiguration.DataRepositoryConfiguration.FailureDetails.Message")
    var ImportedFileChunkSize: Int = jResp.int(of: "FileSystem.LustreConfiguration.DataRepositoryConfiguration.ImportedFileChunkSize").intValue
    var ImportPath: String? = jResp.string(of: "FileSystem.LustreConfiguration.DataRepositoryConfiguration.ImportPath")
    var DataRepositoryConfigurationLifecycle: String? = jResp.string(of: "FileSystem.LustreConfiguration.DataRepositoryConfiguration.Lifecycle")
    var DeploymentType: String? = jResp.string(of: "FileSystem.LustreConfiguration.DeploymentType")
    var DriveCacheType: String? = jResp.string(of: "FileSystem.LustreConfiguration.DriveCacheType")
    var Destination: String? = jResp.string(of: "FileSystem.LustreConfiguration.LogConfiguration.Destination")
    var Level: String? = jResp.string(of: "FileSystem.LustreConfiguration.LogConfiguration.Level")
    var MountName: String? = jResp.string(of: "FileSystem.LustreConfiguration.MountName")
    var PerUnitStorageThroughput: Int = jResp.int(of: "FileSystem.LustreConfiguration.PerUnitStorageThroughput").intValue
    var WeeklyMaintenanceStartTime: String? = jResp.string(of: "FileSystem.LustreConfiguration.WeeklyMaintenanceStartTime")
    var OntapConfigurationAutomaticBackupRetentionDays: Int = jResp.int(of: "FileSystem.OntapConfiguration.AutomaticBackupRetentionDays").intValue
    var OntapConfigurationDailyAutomaticBackupStartTime: String? = jResp.string(of: "FileSystem.OntapConfiguration.DailyAutomaticBackupStartTime")
    var OntapConfigurationDeploymentType: String? = jResp.string(of: "FileSystem.OntapConfiguration.DeploymentType")
    var Iops: Int = jResp.int(of: "FileSystem.OntapConfiguration.DiskIopsConfiguration.Iops").intValue
    var Mode: String? = jResp.string(of: "FileSystem.OntapConfiguration.DiskIopsConfiguration.Mode")
    var EndpointIpAddressRange: String? = jResp.string(of: "FileSystem.OntapConfiguration.EndpointIpAddressRange")
    var InterclusterDNSName: String? = jResp.string(of: "FileSystem.OntapConfiguration.Endpoints.Intercluster.DNSName")
    var ManagementDNSName: String? = jResp.string(of: "FileSystem.OntapConfiguration.Endpoints.Management.DNSName")
    var PreferredSubnetId: String? = jResp.string(of: "FileSystem.OntapConfiguration.PreferredSubnetId")
    var ThroughputCapacity: Int = jResp.int(of: "FileSystem.OntapConfiguration.ThroughputCapacity").intValue
    var OntapConfigurationWeeklyMaintenanceStartTime: String? = jResp.string(of: "FileSystem.OntapConfiguration.WeeklyMaintenanceStartTime")
    var OpenZFSConfigurationAutomaticBackupRetentionDays: Int = jResp.int(of: "FileSystem.OpenZFSConfiguration.AutomaticBackupRetentionDays").intValue
    var OpenZFSConfigurationCopyTagsToBackups: Int = jResp.int(of: "FileSystem.OpenZFSConfiguration.CopyTagsToBackups").intValue
    var CopyTagsToVolumes: Int = jResp.int(of: "FileSystem.OpenZFSConfiguration.CopyTagsToVolumes").intValue
    var OpenZFSConfigurationDailyAutomaticBackupStartTime: String? = jResp.string(of: "FileSystem.OpenZFSConfiguration.DailyAutomaticBackupStartTime")
    var OpenZFSConfigurationDeploymentType: String? = jResp.string(of: "FileSystem.OpenZFSConfiguration.DeploymentType")
    var DiskIopsConfigurationIops: Int = jResp.int(of: "FileSystem.OpenZFSConfiguration.DiskIopsConfiguration.Iops").intValue
    var DiskIopsConfigurationMode: String? = jResp.string(of: "FileSystem.OpenZFSConfiguration.DiskIopsConfiguration.Mode")
    var RootVolumeId: String? = jResp.string(of: "FileSystem.OpenZFSConfiguration.RootVolumeId")
    var OpenZFSConfigurationThroughputCapacity: Int = jResp.int(of: "FileSystem.OpenZFSConfiguration.ThroughputCapacity").intValue
    var OpenZFSConfigurationWeeklyMaintenanceStartTime: String? = jResp.string(of: "FileSystem.OpenZFSConfiguration.WeeklyMaintenanceStartTime")
    var OwnerId: String? = jResp.string(of: "FileSystem.OwnerId")
    var ResourceARN: String? = jResp.string(of: "FileSystem.ResourceARN")
    var StorageCapacity: Int = jResp.int(of: "FileSystem.StorageCapacity").intValue
    var StorageType: String? = jResp.string(of: "FileSystem.StorageType")
    var VpcId: String? = jResp.string(of: "FileSystem.VpcId")
    var ActiveDirectoryId: String? = jResp.string(of: "FileSystem.WindowsConfiguration.ActiveDirectoryId")
    var AuditLogDestination: String? = jResp.string(of: "FileSystem.WindowsConfiguration.AuditLogConfiguration.AuditLogDestination")
    var FileAccessAuditLogLevel: String? = jResp.string(of: "FileSystem.WindowsConfiguration.AuditLogConfiguration.FileAccessAuditLogLevel")
    var FileShareAccessAuditLogLevel: String? = jResp.string(of: "FileSystem.WindowsConfiguration.AuditLogConfiguration.FileShareAccessAuditLogLevel")
    var WindowsConfigurationAutomaticBackupRetentionDays: Int = jResp.int(of: "FileSystem.WindowsConfiguration.AutomaticBackupRetentionDays").intValue
    var WindowsConfigurationCopyTagsToBackups: Int = jResp.int(of: "FileSystem.WindowsConfiguration.CopyTagsToBackups").intValue
    var WindowsConfigurationDailyAutomaticBackupStartTime: String? = jResp.string(of: "FileSystem.WindowsConfiguration.DailyAutomaticBackupStartTime")
    var WindowsConfigurationDeploymentType: String? = jResp.string(of: "FileSystem.WindowsConfiguration.DeploymentType")
    var PreferredFileServerIp: String? = jResp.string(of: "FileSystem.WindowsConfiguration.PreferredFileServerIp")
    var WindowsConfigurationPreferredSubnetId: String? = jResp.string(of: "FileSystem.WindowsConfiguration.PreferredSubnetId")
    var RemoteAdministrationEndpoint: String? = jResp.string(of: "FileSystem.WindowsConfiguration.RemoteAdministrationEndpoint")
    var DomainName: String? = jResp.string(of: "FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DomainName")
    var FileSystemAdministratorsGroup: String? = jResp.string(of: "FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.FileSystemAdministratorsGroup")
    var OrganizationalUnitDistinguishedName: String? = jResp.string(of: "FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.OrganizationalUnitDistinguishedName")
    var UserName: String? = jResp.string(of: "FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.UserName")
    var WindowsConfigurationThroughputCapacity: Int = jResp.int(of: "FileSystem.WindowsConfiguration.ThroughputCapacity").intValue
    var WindowsConfigurationWeeklyMaintenanceStartTime: String? = jResp.string(of: "FileSystem.WindowsConfiguration.WeeklyMaintenanceStartTime")
    var i: Int = 0
    var count_i: Int = jResp.size(ofArray: "FileSystem.AdministrativeActions").intValue
    while i < count_i {
        jResp.i = i
        AdministrativeActionType = jResp.string(of: "FileSystem.AdministrativeActions[i].AdministrativeActionType")
        FailureDetailsMessage = jResp.string(of: "FileSystem.AdministrativeActions[i].FailureDetails.Message")
        ProgressPercent = jResp.int(of: "FileSystem.AdministrativeActions[i].ProgressPercent").intValue
        RequestTime = jResp.int(of: "FileSystem.AdministrativeActions[i].RequestTime").intValue
        Status = jResp.string(of: "FileSystem.AdministrativeActions[i].Status")
        TargetFileSystemValues = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetFileSystemValues")
        TargetSnapshotValuesCreationTime = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.CreationTime").intValue
        TargetSnapshotValuesLifecycle = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.Lifecycle")
        LifecycleTransitionReasonMessage = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.LifecycleTransitionReason.Message")
        Name = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.Name")
        TargetSnapshotValuesResourceARN = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.ResourceARN")
        SnapshotId = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.SnapshotId")
        VolumeId = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.VolumeId")
        TargetVolumeValuesCreationTime = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.CreationTime").intValue
        TargetVolumeValuesFileSystemId = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.FileSystemId")
        TargetVolumeValuesLifecycle = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.Lifecycle")
        LifecycleTransitionReasonMessage = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.LifecycleTransitionReason.Message")
        TargetVolumeValuesName = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.Name")
        FlexCacheEndpointType = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.FlexCacheEndpointType")
        JunctionPath = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.JunctionPath")
        OntapVolumeType = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.OntapVolumeType")
        SecurityStyle = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SecurityStyle")
        SizeInMegabytes = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.SizeInMegabytes").intValue
        StorageEfficiencyEnabled = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageEfficiencyEnabled").intValue
        StorageVirtualMachineId = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineId")
        StorageVirtualMachineRoot = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.StorageVirtualMachineRoot").intValue
        CoolingPeriod = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.CoolingPeriod").intValue
        TieringPolicyName = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.TieringPolicy.Name")
        UUID = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OntapConfiguration.UUID")
        CopyTagsToSnapshots = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.CopyTagsToSnapshots").intValue
        OpenZFSConfigurationDataCompressionType = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.DataCompressionType")
        CopyStrategy = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.CopyStrategy")
        SnapshotARN = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.OriginSnapshot.SnapshotARN")
        ParentVolumeId = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ParentVolumeId")
        ReadOnly = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.ReadOnly").intValue
        RecordSizeKiB = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.RecordSizeKiB").intValue
        StorageCapacityQuotaGiB = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityQuotaGiB").intValue
        StorageCapacityReservationGiB = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.StorageCapacityReservationGiB").intValue
        VolumePath = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.VolumePath")
        TargetVolumeValuesResourceARN = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.ResourceARN")
        TargetVolumeValuesVolumeId = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.VolumeId")
        VolumeType = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.VolumeType")
        j = 0
        count_j = jResp.size(ofArray: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.AdministrativeActions").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.AdministrativeActions[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.Tags").intValue
        while j < count_j {
            jResp.j = j
            Key = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.Tags[j].Key")
            Value = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetSnapshotValues.Tags[j].Value")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "FileSystem.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions").intValue
        while j < count_j {
            jResp.j = j
            strVal = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.AdministrativeActions[j]")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports").intValue
        while j < count_j {
            jResp.j = j
            k = 0
            count_k = jResp.size(ofArray: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations").intValue
            while k < count_k {
                jResp.k = k
                Clients = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k].Clients")

                json1 = jResp.object(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.NfsExports[j].ClientConfigurations[k]")
                i1 = 0
                count_i1 = json1!.size(ofArray: "Options").intValue
                while i1 < count_i1 {
                    json1.i = i1
                    strVal = json1!.string(of: "Options[i]")
                    i1 = i1 + 1
                }

                json1 = nil
                k = k + 1
            }

            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas").intValue
        while j < count_j {
            jResp.j = j
            Id = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Id").intValue
            StorageCapacityQuotaGiB = jResp.int(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].StorageCapacityQuotaGiB").intValue
            v_Type = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.OpenZFSConfiguration.UserAndGroupQuotas[j].Type")
            j = j + 1
        }

        j = 0
        count_j = jResp.size(ofArray: "FileSystem.AdministrativeActions[i].TargetVolumeValues.Tags").intValue
        while j < count_j {
            jResp.j = j
            Key = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.Tags[j].Key")
            Value = jResp.string(of: "FileSystem.AdministrativeActions[i].TargetVolumeValues.Tags[j].Value")
            j = j + 1
        }

        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.NetworkInterfaceIds").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "FileSystem.NetworkInterfaceIds[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.OntapConfiguration.Endpoints.Intercluster.IpAddresses").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "FileSystem.OntapConfiguration.Endpoints.Intercluster.IpAddresses[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.OntapConfiguration.Endpoints.Management.IpAddresses").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "FileSystem.OntapConfiguration.Endpoints.Management.IpAddresses[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.OntapConfiguration.RouteTableIds").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "FileSystem.OntapConfiguration.RouteTableIds[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.SubnetIds").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "FileSystem.SubnetIds[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.Tags").intValue
    while i < count_i {
        jResp.i = i
        Key = jResp.string(of: "FileSystem.Tags[i].Key")
        Value = jResp.string(of: "FileSystem.Tags[i].Value")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.WindowsConfiguration.Aliases").intValue
    while i < count_i {
        jResp.i = i
        Lifecycle = jResp.string(of: "FileSystem.WindowsConfiguration.Aliases[i].Lifecycle")
        Name = jResp.string(of: "FileSystem.WindowsConfiguration.Aliases[i].Name")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.WindowsConfiguration.MaintenanceOperationsInProgress").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "FileSystem.WindowsConfiguration.MaintenanceOperationsInProgress[i]")
        i = i + 1
    }

    i = 0
    count_i = jResp.size(ofArray: "FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps").intValue
    while i < count_i {
        jResp.i = i
        strVal = jResp.string(of: "FileSystem.WindowsConfiguration.SelfManagedActiveDirectoryConfiguration.DnsIps[i]")
        i = i + 1
    }

    // A sample JSON response body parsed by the above code:

    // {
    //   "FileSystem": {
    //     "AdministrativeActions": [
    //       {
    //         "AdministrativeActionType": "string",
    //         "FailureDetails": {
    //           "Message": "string"
    //         },
    //         "ProgressPercent": number,
    //         "RequestTime": number,
    //         "Status": "string",
    //         "TargetFileSystemValues": "FileSystem",
    //         "TargetSnapshotValues": {
    //           "AdministrativeActions": [
    //             "AdministrativeAction"
    //           ],
    //           "CreationTime": number,
    //           "Lifecycle": "string",
    //           "LifecycleTransitionReason": {
    //             "Message": "string"
    //           },
    //           "Name": "string",
    //           "ResourceARN": "string",
    //           "SnapshotId": "string",
    //           "Tags": [
    //             {
    //               "Key": "string",
    //               "Value": "string"
    //             }
    //           ],
    //           "VolumeId": "string"
    //         },
    //         "TargetVolumeValues": {
    //           "AdministrativeActions": [
    //             "AdministrativeAction"
    //           ],
    //           "CreationTime": number,
    //           "FileSystemId": "string",
    //           "Lifecycle": "string",
    //           "LifecycleTransitionReason": {
    //             "Message": "string"
    //           },
    //           "Name": "string",
    //           "OntapConfiguration": {
    //             "FlexCacheEndpointType": "string",
    //             "JunctionPath": "string",
    //             "OntapVolumeType": "string",
    //             "SecurityStyle": "string",
    //             "SizeInMegabytes": number,
    //             "StorageEfficiencyEnabled": boolean,
    //             "StorageVirtualMachineId": "string",
    //             "StorageVirtualMachineRoot": boolean,
    //             "TieringPolicy": {
    //               "CoolingPeriod": number,
    //               "Name": "string"
    //             },
    //             "UUID": "string"
    //           },
    //           "OpenZFSConfiguration": {
    //             "CopyTagsToSnapshots": boolean,
    //             "DataCompressionType": "string",
    //             "NfsExports": [
    //               {
    //                 "ClientConfigurations": [
    //                   {
    //                     "Clients": "string",
    //                     "Options": [
    //                       "string"
    //                     ]
    //                   }
    //                 ]
    //               }
    //             ],
    //             "OriginSnapshot": {
    //               "CopyStrategy": "string",
    //               "SnapshotARN": "string"
    //             },
    //             "ParentVolumeId": "string",
    //             "ReadOnly": boolean,
    //             "RecordSizeKiB": number,
    //             "StorageCapacityQuotaGiB": number,
    //             "StorageCapacityReservationGiB": number,
    //             "UserAndGroupQuotas": [
    //               {
    //                 "Id": number,
    //                 "StorageCapacityQuotaGiB": number,
    //                 "Type": "string"
    //               }
    //             ],
    //             "VolumePath": "string"
    //           },
    //           "ResourceARN": "string",
    //           "Tags": [
    //             {
    //               "Key": "string",
    //               "Value": "string"
    //             }
    //           ],
    //           "VolumeId": "string",
    //           "VolumeType": "string"
    //         }
    //       }
    //     ],
    //     "CreationTime": number,
    //     "DNSName": "string",
    //     "FailureDetails": {
    //       "Message": "string"
    //     },
    //     "FileSystemId": "string",
    //     "FileSystemType": "string",
    //     "FileSystemTypeVersion": "string",
    //     "KmsKeyId": "string",
    //     "Lifecycle": "string",
    //     "LustreConfiguration": {
    //       "AutomaticBackupRetentionDays": number,
    //       "CopyTagsToBackups": boolean,
    //       "DailyAutomaticBackupStartTime": "string",
    //       "DataCompressionType": "string",
    //       "DataRepositoryConfiguration": {
    //         "AutoImportPolicy": "string",
    //         "ExportPath": "string",
    //         "FailureDetails": {
    //           "Message": "string"
    //         },
    //         "ImportedFileChunkSize": number,
    //         "ImportPath": "string",
    //         "Lifecycle": "string"
    //       },
    //       "DeploymentType": "string",
    //       "DriveCacheType": "string",
    //       "LogConfiguration": {
    //         "Destination": "string",
    //         "Level": "string"
    //       },
    //       "MountName": "string",
    //       "PerUnitStorageThroughput": number,
    //       "WeeklyMaintenanceStartTime": "string"
    //     },
    //     "NetworkInterfaceIds": [
    //       "string"
    //     ],
    //     "OntapConfiguration": {
    //       "AutomaticBackupRetentionDays": number,
    //       "DailyAutomaticBackupStartTime": "string",
    //       "DeploymentType": "string",
    //       "DiskIopsConfiguration": {
    //         "Iops": number,
    //         "Mode": "string"
    //       },
    //       "EndpointIpAddressRange": "string",
    //       "Endpoints": {
    //         "Intercluster": {
    //           "DNSName": "string",
    //           "IpAddresses": [
    //             "string"
    //           ]
    //         },
    //         "Management": {
    //           "DNSName": "string",
    //           "IpAddresses": [
    //             "string"
    //           ]
    //         }
    //       },
    //       "PreferredSubnetId": "string",
    //       "RouteTableIds": [
    //         "string"
    //       ],
    //       "ThroughputCapacity": number,
    //       "WeeklyMaintenanceStartTime": "string"
    //     },
    //     "OpenZFSConfiguration": {
    //       "AutomaticBackupRetentionDays": number,
    //       "CopyTagsToBackups": boolean,
    //       "CopyTagsToVolumes": boolean,
    //       "DailyAutomaticBackupStartTime": "string",
    //       "DeploymentType": "string",
    //       "DiskIopsConfiguration": {
    //         "Iops": number,
    //         "Mode": "string"
    //       },
    //       "RootVolumeId": "string",
    //       "ThroughputCapacity": number,
    //       "WeeklyMaintenanceStartTime": "string"
    //     },
    //     "OwnerId": "string",
    //     "ResourceARN": "string",
    //     "StorageCapacity": number,
    //     "StorageType": "string",
    //     "SubnetIds": [
    //       "string"
    //     ],
    //     "Tags": [
    //       {
    //         "Key": "string",
    //         "Value": "string"
    //       }
    //     ],
    //     "VpcId": "string",
    //     "WindowsConfiguration": {
    //       "ActiveDirectoryId": "string",
    //       "Aliases": [
    //         {
    //           "Lifecycle": "string",
    //           "Name": "string"
    //         }
    //       ],
    //       "AuditLogConfiguration": {
    //         "AuditLogDestination": "string",
    //         "FileAccessAuditLogLevel": "string",
    //         "FileShareAccessAuditLogLevel": "string"
    //       },
    //       "AutomaticBackupRetentionDays": number,
    //       "CopyTagsToBackups": boolean,
    //       "DailyAutomaticBackupStartTime": "string",
    //       "DeploymentType": "string",
    //       "MaintenanceOperationsInProgress": [
    //         "string"
    //       ],
    //       "PreferredFileServerIp": "string",
    //       "PreferredSubnetId": "string",
    //       "RemoteAdministrationEndpoint": "string",
    //       "SelfManagedActiveDirectoryConfiguration": {
    //         "DnsIps": [
    //           "string"
    //         ],
    //         "DomainName": "string",
    //         "FileSystemAdministratorsGroup": "string",
    //         "OrganizationalUnitDistinguishedName": "string",
    //         "UserName": "string"
    //       },
    //       "ThroughputCapacity": number,
    //       "WeeklyMaintenanceStartTime": "string"
    //     }
    //   }
    // }

}