toJson method
Implementation
Map<String, dynamic> toJson() {
final address = this.address;
final attributes = this.attributes;
final channelType = this.channelType;
final demographic = this.demographic;
final effectiveDate = this.effectiveDate;
final endpointStatus = this.endpointStatus;
final id = this.id;
final location = this.location;
final metrics = this.metrics;
final optOut = this.optOut;
final requestId = this.requestId;
final user = this.user;
return {
if (address != null) 'Address': address,
if (attributes != null) 'Attributes': attributes,
if (channelType != null) 'ChannelType': channelType.toValue(),
if (demographic != null) 'Demographic': demographic,
if (effectiveDate != null) 'EffectiveDate': effectiveDate,
if (endpointStatus != null) 'EndpointStatus': endpointStatus,
if (id != null) 'Id': id,
if (location != null) 'Location': location,
if (metrics != null) 'Metrics': metrics,
if (optOut != null) 'OptOut': optOut,
if (requestId != null) 'RequestId': requestId,
if (user != null) 'User': user,
};
}