InstanceInformation.fromJson constructor

InstanceInformation.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory InstanceInformation.fromJson(Map<String, dynamic> json) {
  return InstanceInformation(
    activationId: json['ActivationId'] as String?,
    agentVersion: json['AgentVersion'] as String?,
    associationOverview: json['AssociationOverview'] != null
        ? InstanceAggregatedAssociationOverview.fromJson(
            json['AssociationOverview'] as Map<String, dynamic>)
        : null,
    associationStatus: json['AssociationStatus'] as String?,
    computerName: json['ComputerName'] as String?,
    iPAddress: json['IPAddress'] as String?,
    iamRole: json['IamRole'] as String?,
    instanceId: json['InstanceId'] as String?,
    isLatestVersion: json['IsLatestVersion'] as bool?,
    lastAssociationExecutionDate:
        timeStampFromJson(json['LastAssociationExecutionDate']),
    lastPingDateTime: timeStampFromJson(json['LastPingDateTime']),
    lastSuccessfulAssociationExecutionDate:
        timeStampFromJson(json['LastSuccessfulAssociationExecutionDate']),
    name: json['Name'] as String?,
    pingStatus: (json['PingStatus'] as String?)?.toPingStatus(),
    platformName: json['PlatformName'] as String?,
    platformType: (json['PlatformType'] as String?)?.toPlatformType(),
    platformVersion: json['PlatformVersion'] as String?,
    registrationDate: timeStampFromJson(json['RegistrationDate']),
    resourceType: (json['ResourceType'] as String?)?.toResourceType(),
  );
}