GoogleCloudPaymentsResellerSubscriptionV1Promotion.fromJson constructor

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,
        introductoryPricingDetails: json_
                .containsKey('introductoryPricingDetails')
            ? GoogleCloudPaymentsResellerSubscriptionV1PromotionIntroductoryPricingDetails
                .fromJson(json_['introductoryPricingDetails']
                    as core.Map<core.String, core.dynamic>)
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        promotionType: json_.containsKey('promotionType')
            ? json_['promotionType'] 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,
      );