ChannelSection.fromJson constructor

ChannelSection.fromJson(
  1. Map json_
)

Implementation

ChannelSection.fromJson(core.Map json_)
    : this(
        contentDetails: json_.containsKey('contentDetails')
            ? ChannelSectionContentDetails.fromJson(json_['contentDetails']
                as core.Map<core.String, core.dynamic>)
            : null,
        etag: json_.containsKey('etag') ? json_['etag'] as core.String : null,
        id: json_.containsKey('id') ? json_['id'] as core.String : null,
        kind: json_.containsKey('kind') ? json_['kind'] as core.String : null,
        localizations: json_.containsKey('localizations')
            ? (json_['localizations'] as core.Map<core.String, core.dynamic>)
                .map(
                (key, value) => core.MapEntry(
                  key,
                  ChannelSectionLocalization.fromJson(
                      value as core.Map<core.String, core.dynamic>),
                ),
              )
            : null,
        snippet: json_.containsKey('snippet')
            ? ChannelSectionSnippet.fromJson(
                json_['snippet'] as core.Map<core.String, core.dynamic>)
            : null,
        targeting: json_.containsKey('targeting')
            ? ChannelSectionTargeting.fromJson(
                json_['targeting'] as core.Map<core.String, core.dynamic>)
            : null,
      );