InstanceConfig.fromJson constructor

InstanceConfig.fromJson(
  1. Map json_
)

Implementation

InstanceConfig.fromJson(core.Map json_)
    : this(
        accountNetworksEnabled: json_.containsKey('accountNetworksEnabled')
            ? json_['accountNetworksEnabled'] as core.bool
            : null,
        clientNetwork: json_.containsKey('clientNetwork')
            ? NetworkAddress.fromJson(
                json_['clientNetwork'] as core.Map<core.String, core.dynamic>)
            : null,
        hyperthreading: json_.containsKey('hyperthreading')
            ? json_['hyperthreading'] as core.bool
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        instanceType: json_.containsKey('instanceType')
            ? json_['instanceType'] as core.String
            : null,
        kmsKeyVersion: json_.containsKey('kmsKeyVersion')
            ? json_['kmsKeyVersion'] as core.String
            : null,
        logicalInterfaces: json_.containsKey('logicalInterfaces')
            ? (json_['logicalInterfaces'] as core.List)
                .map((value) =>
                    GoogleCloudBaremetalsolutionV2LogicalInterface.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        networkConfig: json_.containsKey('networkConfig')
            ? json_['networkConfig'] as core.String
            : null,
        networkTemplate: json_.containsKey('networkTemplate')
            ? json_['networkTemplate'] as core.String
            : null,
        osImage: json_.containsKey('osImage')
            ? json_['osImage'] as core.String
            : null,
        privateNetwork: json_.containsKey('privateNetwork')
            ? NetworkAddress.fromJson(json_['privateNetwork']
                as core.Map<core.String, core.dynamic>)
            : null,
        sshKeyNames: json_.containsKey('sshKeyNames')
            ? (json_['sshKeyNames'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        userNote: json_.containsKey('userNote')
            ? json_['userNote'] as core.String
            : null,
      );