fun convertFromGetSuiteDefinitionResponse()

in aws-iotcoredeviceadvisor-suitedefinition/src/main/kotlin/software/amazon/iotcoredeviceadvisor/suitedefinition/Converter.kt [33:46]


        fun convertFromGetSuiteDefinitionResponse(getSuiteDefinitionResponse: GetSuiteDefinitionResponse): ResourceModel {
            return ResourceModel().apply {
                this.suiteDefinitionId = getSuiteDefinitionResponse.suiteDefinitionId()
                this.suiteDefinitionArn = getSuiteDefinitionResponse.suiteDefinitionArn()
                this.suiteDefinitionVersion = getSuiteDefinitionResponse.suiteDefinitionVersion()
                this.suiteDefinitionConfiguration = getSuiteDefinitionResponse.suiteDefinitionConfiguration().let { suiteDefinitionConfiguration -> ModeledSuiteDefinitionConfiguration().apply {
                    this.intendedForQualification = suiteDefinitionConfiguration.intendedForQualification()
                    this.devicePermissionRoleArn = suiteDefinitionConfiguration.devicePermissionRoleArn()
                    this.suiteDefinitionName = suiteDefinitionConfiguration.suiteDefinitionName()
                    this.rootGroup = suiteDefinitionConfiguration.rootGroup()
                    this.devices = convertToModeledDevices(suiteDefinitionConfiguration.devices())
                }}
            }
        }