public static function fromMap()

in imm-20200930/src/Models/File.php [994:1417]


    public static function fromMap($map = [])
    {
        $model = new self();
        if (isset($map['AccessControlAllowOrigin'])) {
            $model->accessControlAllowOrigin = $map['AccessControlAllowOrigin'];
        }

        if (isset($map['AccessControlRequestMethod'])) {
            $model->accessControlRequestMethod = $map['AccessControlRequestMethod'];
        }

        if (isset($map['Addresses'])) {
            if (!empty($map['Addresses'])) {
                $model->addresses = [];
                $n1 = 0;
                foreach ($map['Addresses'] as $item1) {
                    $model->addresses[$n1++] = Address::fromMap($item1);
                }
            }
        }

        if (isset($map['Album'])) {
            $model->album = $map['Album'];
        }

        if (isset($map['AlbumArtist'])) {
            $model->albumArtist = $map['AlbumArtist'];
        }

        if (isset($map['Artist'])) {
            $model->artist = $map['Artist'];
        }

        if (isset($map['AudioCovers'])) {
            if (!empty($map['AudioCovers'])) {
                $model->audioCovers = [];
                $n1 = 0;
                foreach ($map['AudioCovers'] as $item1) {
                    $model->audioCovers[$n1++] = Image::fromMap($item1);
                }
            }
        }

        if (isset($map['AudioStreams'])) {
            if (!empty($map['AudioStreams'])) {
                $model->audioStreams = [];
                $n1 = 0;
                foreach ($map['AudioStreams'] as $item1) {
                    $model->audioStreams[$n1++] = AudioStream::fromMap($item1);
                }
            }
        }

        if (isset($map['Bitrate'])) {
            $model->bitrate = $map['Bitrate'];
        }

        if (isset($map['CacheControl'])) {
            $model->cacheControl = $map['CacheControl'];
        }

        if (isset($map['Composer'])) {
            $model->composer = $map['Composer'];
        }

        if (isset($map['ContentDisposition'])) {
            $model->contentDisposition = $map['ContentDisposition'];
        }

        if (isset($map['ContentEncoding'])) {
            $model->contentEncoding = $map['ContentEncoding'];
        }

        if (isset($map['ContentLanguage'])) {
            $model->contentLanguage = $map['ContentLanguage'];
        }

        if (isset($map['ContentMd5'])) {
            $model->contentMd5 = $map['ContentMd5'];
        }

        if (isset($map['ContentType'])) {
            $model->contentType = $map['ContentType'];
        }

        if (isset($map['CreateTime'])) {
            $model->createTime = $map['CreateTime'];
        }

        if (isset($map['CroppingSuggestions'])) {
            if (!empty($map['CroppingSuggestions'])) {
                $model->croppingSuggestions = [];
                $n1 = 0;
                foreach ($map['CroppingSuggestions'] as $item1) {
                    $model->croppingSuggestions[$n1++] = CroppingSuggestion::fromMap($item1);
                }
            }
        }

        if (isset($map['CustomId'])) {
            $model->customId = $map['CustomId'];
        }

        if (isset($map['CustomLabels'])) {
            if (!empty($map['CustomLabels'])) {
                $model->customLabels = [];
                foreach ($map['CustomLabels'] as $key1 => $value1) {
                    $model->customLabels[$key1] = $value1;
                }
            }
        }

        if (isset($map['DatasetName'])) {
            $model->datasetName = $map['DatasetName'];
        }

        if (isset($map['Duration'])) {
            $model->duration = $map['Duration'];
        }

        if (isset($map['ETag'])) {
            $model->ETag = $map['ETag'];
        }

        if (isset($map['EXIF'])) {
            $model->EXIF = $map['EXIF'];
        }

        if (isset($map['Elements'])) {
            if (!empty($map['Elements'])) {
                $model->elements = [];
                $n1 = 0;
                foreach ($map['Elements'] as $item1) {
                    $model->elements[$n1++] = Element::fromMap($item1);
                }
            }
        }

        if (isset($map['FigureCount'])) {
            $model->figureCount = $map['FigureCount'];
        }

        if (isset($map['Figures'])) {
            if (!empty($map['Figures'])) {
                $model->figures = [];
                $n1 = 0;
                foreach ($map['Figures'] as $item1) {
                    $model->figures[$n1++] = Figure::fromMap($item1);
                }
            }
        }

        if (isset($map['FileAccessTime'])) {
            $model->fileAccessTime = $map['FileAccessTime'];
        }

        if (isset($map['FileCreateTime'])) {
            $model->fileCreateTime = $map['FileCreateTime'];
        }

        if (isset($map['FileHash'])) {
            $model->fileHash = $map['FileHash'];
        }

        if (isset($map['FileModifiedTime'])) {
            $model->fileModifiedTime = $map['FileModifiedTime'];
        }

        if (isset($map['Filename'])) {
            $model->filename = $map['Filename'];
        }

        if (isset($map['FormatLongName'])) {
            $model->formatLongName = $map['FormatLongName'];
        }

        if (isset($map['FormatName'])) {
            $model->formatName = $map['FormatName'];
        }

        if (isset($map['ImageHeight'])) {
            $model->imageHeight = $map['ImageHeight'];
        }

        if (isset($map['ImageScore'])) {
            $model->imageScore = ImageScore::fromMap($map['ImageScore']);
        }

        if (isset($map['ImageWidth'])) {
            $model->imageWidth = $map['ImageWidth'];
        }

        if (isset($map['Labels'])) {
            if (!empty($map['Labels'])) {
                $model->labels = [];
                $n1 = 0;
                foreach ($map['Labels'] as $item1) {
                    $model->labels[$n1++] = Label::fromMap($item1);
                }
            }
        }

        if (isset($map['Language'])) {
            $model->language = $map['Language'];
        }

        if (isset($map['LatLong'])) {
            $model->latLong = $map['LatLong'];
        }

        if (isset($map['MediaType'])) {
            $model->mediaType = $map['MediaType'];
        }

        if (isset($map['OCRContents'])) {
            if (!empty($map['OCRContents'])) {
                $model->OCRContents = [];
                $n1 = 0;
                foreach ($map['OCRContents'] as $item1) {
                    $model->OCRContents[$n1++] = OCRContents::fromMap($item1);
                }
            }
        }

        if (isset($map['OCRTexts'])) {
            $model->OCRTexts = $map['OCRTexts'];
        }

        if (isset($map['OSSCRC64'])) {
            $model->OSSCRC64 = $map['OSSCRC64'];
        }

        if (isset($map['OSSDeleteMarker'])) {
            $model->OSSDeleteMarker = $map['OSSDeleteMarker'];
        }

        if (isset($map['OSSExpiration'])) {
            $model->OSSExpiration = $map['OSSExpiration'];
        }

        if (isset($map['OSSObjectType'])) {
            $model->OSSObjectType = $map['OSSObjectType'];
        }

        if (isset($map['OSSStorageClass'])) {
            $model->OSSStorageClass = $map['OSSStorageClass'];
        }

        if (isset($map['OSSTagging'])) {
            if (!empty($map['OSSTagging'])) {
                $model->OSSTagging = [];
                foreach ($map['OSSTagging'] as $key1 => $value1) {
                    $model->OSSTagging[$key1] = $value1;
                }
            }
        }

        if (isset($map['OSSTaggingCount'])) {
            $model->OSSTaggingCount = $map['OSSTaggingCount'];
        }

        if (isset($map['OSSURI'])) {
            $model->OSSURI = $map['OSSURI'];
        }

        if (isset($map['OSSUserMeta'])) {
            if (!empty($map['OSSUserMeta'])) {
                $model->OSSUserMeta = [];
                foreach ($map['OSSUserMeta'] as $key1 => $value1) {
                    $model->OSSUserMeta[$key1] = $value1;
                }
            }
        }

        if (isset($map['OSSVersionId'])) {
            $model->OSSVersionId = $map['OSSVersionId'];
        }

        if (isset($map['ObjectACL'])) {
            $model->objectACL = $map['ObjectACL'];
        }

        if (isset($map['ObjectId'])) {
            $model->objectId = $map['ObjectId'];
        }

        if (isset($map['ObjectStatus'])) {
            $model->objectStatus = $map['ObjectStatus'];
        }

        if (isset($map['ObjectType'])) {
            $model->objectType = $map['ObjectType'];
        }

        if (isset($map['Orientation'])) {
            $model->orientation = $map['Orientation'];
        }

        if (isset($map['OwnerId'])) {
            $model->ownerId = $map['OwnerId'];
        }

        if (isset($map['PageCount'])) {
            $model->pageCount = $map['PageCount'];
        }

        if (isset($map['Performer'])) {
            $model->performer = $map['Performer'];
        }

        if (isset($map['ProduceTime'])) {
            $model->produceTime = $map['ProduceTime'];
        }

        if (isset($map['ProgramCount'])) {
            $model->programCount = $map['ProgramCount'];
        }

        if (isset($map['ProjectName'])) {
            $model->projectName = $map['ProjectName'];
        }

        if (isset($map['Reason'])) {
            $model->reason = $map['Reason'];
        }

        if (isset($map['SceneElements'])) {
            if (!empty($map['SceneElements'])) {
                $model->sceneElements = [];
                $n1 = 0;
                foreach ($map['SceneElements'] as $item1) {
                    $model->sceneElements[$n1++] = SceneElement::fromMap($item1);
                }
            }
        }

        if (isset($map['SemanticTypes'])) {
            if (!empty($map['SemanticTypes'])) {
                $model->semanticTypes = [];
                $n1 = 0;
                foreach ($map['SemanticTypes'] as $item1) {
                    $model->semanticTypes[$n1++] = $item1;
                }
            }
        }

        if (isset($map['ServerSideDataEncryption'])) {
            $model->serverSideDataEncryption = $map['ServerSideDataEncryption'];
        }

        if (isset($map['ServerSideEncryption'])) {
            $model->serverSideEncryption = $map['ServerSideEncryption'];
        }

        if (isset($map['ServerSideEncryptionCustomerAlgorithm'])) {
            $model->serverSideEncryptionCustomerAlgorithm = $map['ServerSideEncryptionCustomerAlgorithm'];
        }

        if (isset($map['ServerSideEncryptionKeyId'])) {
            $model->serverSideEncryptionKeyId = $map['ServerSideEncryptionKeyId'];
        }

        if (isset($map['Size'])) {
            $model->size = $map['Size'];
        }

        if (isset($map['StartTime'])) {
            $model->startTime = $map['StartTime'];
        }

        if (isset($map['StreamCount'])) {
            $model->streamCount = $map['StreamCount'];
        }

        if (isset($map['Subtitles'])) {
            if (!empty($map['Subtitles'])) {
                $model->subtitles = [];
                $n1 = 0;
                foreach ($map['Subtitles'] as $item1) {
                    $model->subtitles[$n1++] = SubtitleStream::fromMap($item1);
                }
            }
        }

        if (isset($map['Timezone'])) {
            $model->timezone = $map['Timezone'];
        }

        if (isset($map['Title'])) {
            $model->title = $map['Title'];
        }

        if (isset($map['TravelClusterId'])) {
            $model->travelClusterId = $map['TravelClusterId'];
        }

        if (isset($map['URI'])) {
            $model->URI = $map['URI'];
        }

        if (isset($map['UpdateTime'])) {
            $model->updateTime = $map['UpdateTime'];
        }

        if (isset($map['VideoHeight'])) {
            $model->videoHeight = $map['VideoHeight'];
        }

        if (isset($map['VideoStreams'])) {
            if (!empty($map['VideoStreams'])) {
                $model->videoStreams = [];
                $n1 = 0;
                foreach ($map['VideoStreams'] as $item1) {
                    $model->videoStreams[$n1++] = VideoStream::fromMap($item1);
                }
            }
        }

        if (isset($map['VideoWidth'])) {
            $model->videoWidth = $map['VideoWidth'];
        }

        return $model;
    }