toJson method

Map<String, dynamic> toJson()

Implementation

Map<String, dynamic> toJson() {
  final configRuleName = this.configRuleName;
  final targetId = this.targetId;
  final targetType = this.targetType;
  final arn = this.arn;
  final automatic = this.automatic;
  final createdByService = this.createdByService;
  final executionControls = this.executionControls;
  final maximumAutomaticAttempts = this.maximumAutomaticAttempts;
  final parameters = this.parameters;
  final resourceType = this.resourceType;
  final retryAttemptSeconds = this.retryAttemptSeconds;
  final targetVersion = this.targetVersion;
  return {
    'ConfigRuleName': configRuleName,
    'TargetId': targetId,
    'TargetType': targetType.toValue(),
    if (arn != null) 'Arn': arn,
    if (automatic != null) 'Automatic': automatic,
    if (createdByService != null) 'CreatedByService': createdByService,
    if (executionControls != null) 'ExecutionControls': executionControls,
    if (maximumAutomaticAttempts != null)
      'MaximumAutomaticAttempts': maximumAutomaticAttempts,
    if (parameters != null) 'Parameters': parameters,
    if (resourceType != null) 'ResourceType': resourceType,
    if (retryAttemptSeconds != null)
      'RetryAttemptSeconds': retryAttemptSeconds,
    if (targetVersion != null) 'TargetVersion': targetVersion,
  };
}