GoogleCloudRetailV2SearchRequest.fromJson constructor

GoogleCloudRetailV2SearchRequest.fromJson(
  1. Map json_
)

Implementation

GoogleCloudRetailV2SearchRequest.fromJson(core.Map json_)
    : this(
        boostSpec: json_.containsKey('boostSpec')
            ? GoogleCloudRetailV2SearchRequestBoostSpec.fromJson(
                json_['boostSpec'] as core.Map<core.String, core.dynamic>)
            : null,
        branch: json_.containsKey('branch')
            ? json_['branch'] as core.String
            : null,
        canonicalFilter: json_.containsKey('canonicalFilter')
            ? json_['canonicalFilter'] as core.String
            : null,
        dynamicFacetSpec: json_.containsKey('dynamicFacetSpec')
            ? GoogleCloudRetailV2SearchRequestDynamicFacetSpec.fromJson(
                json_['dynamicFacetSpec']
                    as core.Map<core.String, core.dynamic>)
            : null,
        entity: json_.containsKey('entity')
            ? json_['entity'] as core.String
            : null,
        facetSpecs: json_.containsKey('facetSpecs')
            ? (json_['facetSpecs'] as core.List)
                .map((value) =>
                    GoogleCloudRetailV2SearchRequestFacetSpec.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        filter: json_.containsKey('filter')
            ? json_['filter'] 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,
        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,
        pageSize: json_.containsKey('pageSize')
            ? json_['pageSize'] as core.int
            : null,
        pageToken: json_.containsKey('pageToken')
            ? json_['pageToken'] as core.String
            : null,
        personalizationSpec: json_.containsKey('personalizationSpec')
            ? GoogleCloudRetailV2SearchRequestPersonalizationSpec.fromJson(
                json_['personalizationSpec']
                    as core.Map<core.String, core.dynamic>)
            : null,
        query:
            json_.containsKey('query') ? json_['query'] as core.String : null,
        queryExpansionSpec: json_.containsKey('queryExpansionSpec')
            ? GoogleCloudRetailV2SearchRequestQueryExpansionSpec.fromJson(
                json_['queryExpansionSpec']
                    as core.Map<core.String, core.dynamic>)
            : null,
        searchMode: json_.containsKey('searchMode')
            ? json_['searchMode'] as core.String
            : null,
        spellCorrectionSpec: json_.containsKey('spellCorrectionSpec')
            ? GoogleCloudRetailV2SearchRequestSpellCorrectionSpec.fromJson(
                json_['spellCorrectionSpec']
                    as core.Map<core.String, core.dynamic>)
            : null,
        userInfo: json_.containsKey('userInfo')
            ? GoogleCloudRetailV2UserInfo.fromJson(
                json_['userInfo'] as core.Map<core.String, core.dynamic>)
            : null,
        variantRollupKeys: json_.containsKey('variantRollupKeys')
            ? (json_['variantRollupKeys'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        visitorId: json_.containsKey('visitorId')
            ? json_['visitorId'] as core.String
            : null,
      );