GoogleCloudPaymentsResellerSubscriptionV1Promotion.fromJson constructor Null safety

GoogleCloudPaymentsResellerSubscriptionV1Promotion.fromJson(
  1. Map _json
)

Implementation

GoogleCloudPaymentsResellerSubscriptionV1Promotion.fromJson(core.Map _json)
    : this(
        applicableProducts: _json.containsKey('applicableProducts')
            ? (_json['applicableProducts'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        endTime: _json.containsKey('endTime')
            ? _json['endTime'] as core.String
            : null,
        freeTrialDuration: _json.containsKey('freeTrialDuration')
            ? GoogleCloudPaymentsResellerSubscriptionV1Duration.fromJson(
                _json['freeTrialDuration']
                    as core.Map<core.String, core.dynamic>)
            : null,
        name: _json.containsKey('name') ? _json['name'] as core.String : null,
        regionCodes: _json.containsKey('regionCodes')
            ? (_json['regionCodes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        startTime: _json.containsKey('startTime')
            ? _json['startTime'] as core.String
            : null,
        titles: _json.containsKey('titles')
            ? (_json['titles'] as core.List)
                .map((value) => GoogleTypeLocalizedText.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
      );