AutoscalingPolicy.fromJson constructor

AutoscalingPolicy.fromJson(
  1. Map json_
)

Implementation

AutoscalingPolicy.fromJson(core.Map json_)
    : this(
        basicAlgorithm: json_.containsKey('basicAlgorithm')
            ? BasicAutoscalingAlgorithm.fromJson(json_['basicAlgorithm']
                as core.Map<core.String, core.dynamic>)
            : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        labels: json_.containsKey('labels')
            ? (json_['labels'] as core.Map<core.String, core.dynamic>).map(
                (key, value) => core.MapEntry(
                  key,
                  value as core.String,
                ),
              )
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        secondaryWorkerConfig: json_.containsKey('secondaryWorkerConfig')
            ? InstanceGroupAutoscalingPolicyConfig.fromJson(
                json_['secondaryWorkerConfig']
                    as core.Map<core.String, core.dynamic>)
            : null,
        workerConfig: json_.containsKey('workerConfig')
            ? InstanceGroupAutoscalingPolicyConfig.fromJson(
                json_['workerConfig'] as core.Map<core.String, core.dynamic>)
            : null,
      );