GoogleCloudRetailV2ServingConfig.fromJson constructor

GoogleCloudRetailV2ServingConfig.fromJson(
  1. Map json_
)

Implementation

GoogleCloudRetailV2ServingConfig.fromJson(core.Map json_)
    : this(
        boostControlIds: json_.containsKey('boostControlIds')
            ? (json_['boostControlIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        displayName: json_.containsKey('displayName')
            ? json_['displayName'] as core.String
            : null,
        diversityLevel: json_.containsKey('diversityLevel')
            ? json_['diversityLevel'] as core.String
            : null,
        diversityType: json_.containsKey('diversityType')
            ? json_['diversityType'] as core.String
            : null,
        doNotAssociateControlIds:
            json_.containsKey('doNotAssociateControlIds')
                ? (json_['doNotAssociateControlIds'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        dynamicFacetSpec: json_.containsKey('dynamicFacetSpec')
            ? GoogleCloudRetailV2SearchRequestDynamicFacetSpec.fromJson(
                json_['dynamicFacetSpec']
                    as core.Map<core.String, core.dynamic>)
            : null,
        enableCategoryFilterLevel:
            json_.containsKey('enableCategoryFilterLevel')
                ? json_['enableCategoryFilterLevel'] as core.String
                : null,
        facetControlIds: json_.containsKey('facetControlIds')
            ? (json_['facetControlIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        filterControlIds: json_.containsKey('filterControlIds')
            ? (json_['filterControlIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        ignoreControlIds: json_.containsKey('ignoreControlIds')
            ? (json_['ignoreControlIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        modelId: json_.containsKey('modelId')
            ? json_['modelId'] as core.String
            : null,
        name: json_.containsKey('name') ? json_['name'] as core.String : null,
        onewaySynonymsControlIds:
            json_.containsKey('onewaySynonymsControlIds')
                ? (json_['onewaySynonymsControlIds'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
        personalizationSpec: json_.containsKey('personalizationSpec')
            ? GoogleCloudRetailV2SearchRequestPersonalizationSpec.fromJson(
                json_['personalizationSpec']
                    as core.Map<core.String, core.dynamic>)
            : null,
        priceRerankingLevel: json_.containsKey('priceRerankingLevel')
            ? json_['priceRerankingLevel'] as core.String
            : null,
        redirectControlIds: json_.containsKey('redirectControlIds')
            ? (json_['redirectControlIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        replacementControlIds: json_.containsKey('replacementControlIds')
            ? (json_['replacementControlIds'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        solutionTypes: json_.containsKey('solutionTypes')
            ? (json_['solutionTypes'] as core.List)
                .map((value) => value as core.String)
                .toList()
            : null,
        twowaySynonymsControlIds:
            json_.containsKey('twowaySynonymsControlIds')
                ? (json_['twowaySynonymsControlIds'] as core.List)
                    .map((value) => value as core.String)
                    .toList()
                : null,
      );