toJson method

  1. @override
Object toJson()
override

Implementation

@override
Object toJson() {
  return {
    'id': id,
    'index': index,
    if (displayName.isNotDefault) 'displayName': displayName,
    if (createTime != null) 'createTime': createTime!.toJson(),
    if (privateEndpoints != null)
      'privateEndpoints': privateEndpoints!.toJson(),
    if (indexSyncTime != null) 'indexSyncTime': indexSyncTime!.toJson(),
    if (automaticResources != null)
      'automaticResources': automaticResources!.toJson(),
    if (dedicatedResources != null)
      'dedicatedResources': dedicatedResources!.toJson(),
    if (enableAccessLogging.isNotDefault)
      'enableAccessLogging': enableAccessLogging,
    if (enableDatapointUpsertLogging.isNotDefault)
      'enableDatapointUpsertLogging': enableDatapointUpsertLogging,
    if (deployedIndexAuthConfig != null)
      'deployedIndexAuthConfig': deployedIndexAuthConfig!.toJson(),
    if (reservedIpRanges.isNotDefault) 'reservedIpRanges': reservedIpRanges,
    if (deploymentGroup.isNotDefault) 'deploymentGroup': deploymentGroup,
    if (pscAutomationConfigs.isNotDefault)
      'pscAutomationConfigs': encodeList(pscAutomationConfigs),
  };
}