GoogleCloudAiplatformV1IndexDatapoint.fromJson constructor

GoogleCloudAiplatformV1IndexDatapoint.fromJson(
  1. Map json_
)

Implementation

GoogleCloudAiplatformV1IndexDatapoint.fromJson(core.Map json_)
    : this(
        crowdingTag: json_.containsKey('crowdingTag')
            ? GoogleCloudAiplatformV1IndexDatapointCrowdingTag.fromJson(
                json_['crowdingTag'] as core.Map<core.String, core.dynamic>)
            : null,
        datapointId: json_.containsKey('datapointId')
            ? json_['datapointId'] as core.String
            : null,
        featureVector: json_.containsKey('featureVector')
            ? (json_['featureVector'] as core.List)
                .map((value) => (value as core.num).toDouble())
                .toList()
            : null,
        numericRestricts: json_.containsKey('numericRestricts')
            ? (json_['numericRestricts'] as core.List)
                .map((value) =>
                    GoogleCloudAiplatformV1IndexDatapointNumericRestriction
                        .fromJson(
                            value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        restricts: json_.containsKey('restricts')
            ? (json_['restricts'] as core.List)
                .map((value) =>
                    GoogleCloudAiplatformV1IndexDatapointRestriction.fromJson(
                        value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        sparseEmbedding: json_.containsKey('sparseEmbedding')
            ? GoogleCloudAiplatformV1IndexDatapointSparseEmbedding.fromJson(
                json_['sparseEmbedding']
                    as core.Map<core.String, core.dynamic>)
            : null,
      );