GoogleCloudRetailV2UserEvent.fromJson constructor

GoogleCloudRetailV2UserEvent.fromJson(
  1. Map json_
)

Implementation

GoogleCloudRetailV2UserEvent.fromJson(core.Map json_)
    : this(
        attributes: json_.containsKey('attributes')
            ? (json_['attributes'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  GoogleCloudRetailV2CustomAttribute.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        attributionToken: json_.containsKey('attributionToken')
            ? json_['attributionToken'] as core.String
            : null,
        cartId: json_.containsKey('cartId')
            ? json_['cartId'] as core.String
            : null,
        completionDetail: json_.containsKey('completionDetail')
            ? GoogleCloudRetailV2CompletionDetail.fromJson(
                json_['completionDetail']
                    as core.Map<core.String, core.dynamic>)
            : null,
        entity: json_.containsKey('entity')
            ? json_['entity'] as core.String
            : null,
        eventTime: json_.containsKey('eventTime')
            ? json_['eventTime'] as core.String
            : null,
        eventType: json_.containsKey('eventType')
            ? json_['eventType'] as core.String
            : null,
        experimentIds: json_.containsKey('experimentIds')
            ? (json_['experimentIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        filter: json_.containsKey('filter')
            ? json_['filter'] as core.String
            : null,
        offset:
            json_.containsKey('offset') ? json_['offset'] as core.int : null,
        orderBy: json_.containsKey('orderBy')
            ? json_['orderBy'] as core.String
            : null,
        pageCategories: json_.containsKey('pageCategories')
            ? (json_['pageCategories'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        pageViewId: json_.containsKey('pageViewId')
            ? json_['pageViewId'] as core.String
            : null,
        productDetails: json_.containsKey('productDetails')
            ? (json_['productDetails'] as core.List)
                .map((value) => GoogleCloudRetailV2ProductDetail.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        purchaseTransaction: json_.containsKey('purchaseTransaction')
            ? GoogleCloudRetailV2PurchaseTransaction.fromJson(
                json_['purchaseTransaction']
                    as core.Map<core.String, core.dynamic>)
            : null,
        referrerUri: json_.containsKey('referrerUri')
            ? json_['referrerUri'] as core.String
            : null,
        searchQuery: json_.containsKey('searchQuery')
            ? json_['searchQuery'] as core.String
            : null,
        sessionId: json_.containsKey('sessionId')
            ? json_['sessionId'] as core.String
            : null,
        uri: json_.containsKey('uri') ? json_['uri'] as core.String : null,
        userInfo: json_.containsKey('userInfo')
            ? GoogleCloudRetailV2UserInfo.fromJson(
                json_['userInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        visitorId: json_.containsKey('visitorId')
            ? json_['visitorId'] as core.String
            : null,
      );