GoogleCloudRetailV2Product.fromJson constructor
GoogleCloudRetailV2Product.fromJson(
- Map json_
Implementation
GoogleCloudRetailV2Product.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,
audience: json_.containsKey('audience')
? GoogleCloudRetailV2Audience.fromJson(
json_['audience'] as core.Map<core.String, core.dynamic>)
: null,
availability: json_.containsKey('availability')
? json_['availability'] as core.String
: null,
availableQuantity: json_.containsKey('availableQuantity')
? json_['availableQuantity'] as core.int
: null,
availableTime: json_.containsKey('availableTime')
? json_['availableTime'] as core.String
: null,
brands: json_.containsKey('brands')
? (json_['brands'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
categories: json_.containsKey('categories')
? (json_['categories'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
collectionMemberIds: json_.containsKey('collectionMemberIds')
? (json_['collectionMemberIds'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
colorInfo: json_.containsKey('colorInfo')
? GoogleCloudRetailV2ColorInfo.fromJson(
json_['colorInfo'] as core.Map<core.String, core.dynamic>)
: null,
conditions: json_.containsKey('conditions')
? (json_['conditions'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
description: json_.containsKey('description')
? json_['description'] as core.String
: null,
expireTime: json_.containsKey('expireTime')
? json_['expireTime'] as core.String
: null,
fulfillmentInfo: json_.containsKey('fulfillmentInfo')
? (json_['fulfillmentInfo'] as core.List)
.map((value) => GoogleCloudRetailV2FulfillmentInfo.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
gtin: json_.containsKey('gtin') ? json_['gtin'] as core.String : null,
id: json_.containsKey('id') ? json_['id'] as core.String : null,
images: json_.containsKey('images')
? (json_['images'] as core.List)
.map((value) => GoogleCloudRetailV2Image.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
languageCode: json_.containsKey('languageCode')
? json_['languageCode'] as core.String
: null,
localInventories: json_.containsKey('localInventories')
? (json_['localInventories'] as core.List)
.map((value) => GoogleCloudRetailV2LocalInventory.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
materials: json_.containsKey('materials')
? (json_['materials'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
name: json_.containsKey('name') ? json_['name'] as core.String : null,
patterns: json_.containsKey('patterns')
? (json_['patterns'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
priceInfo: json_.containsKey('priceInfo')
? GoogleCloudRetailV2PriceInfo.fromJson(
json_['priceInfo'] as core.Map<core.String, core.dynamic>)
: null,
primaryProductId: json_.containsKey('primaryProductId')
? json_['primaryProductId'] as core.String
: null,
promotions: json_.containsKey('promotions')
? (json_['promotions'] as core.List)
.map((value) => GoogleCloudRetailV2Promotion.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
publishTime: json_.containsKey('publishTime')
? json_['publishTime'] as core.String
: null,
rating: json_.containsKey('rating')
? GoogleCloudRetailV2Rating.fromJson(
json_['rating'] as core.Map<core.String, core.dynamic>)
: null,
retrievableFields: json_.containsKey('retrievableFields')
? json_['retrievableFields'] as core.String
: null,
sizes: json_.containsKey('sizes')
? (json_['sizes'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
tags: json_.containsKey('tags')
? (json_['tags'] as core.List)
.map((value) => value as core.String)
.toList()
: null,
title:
json_.containsKey('title') ? json_['title'] as core.String : null,
ttl: json_.containsKey('ttl') ? json_['ttl'] as core.String : null,
type: json_.containsKey('type') ? json_['type'] as core.String : null,
uri: json_.containsKey('uri') ? json_['uri'] as core.String : null,
variants: json_.containsKey('variants')
? (json_['variants'] as core.List)
.map((value) => GoogleCloudRetailV2Product.fromJson(
value as core.Map<core.String, core.dynamic>))
.toList()
: null,
);