copyWith method

DeviceAdditionV2Body copyWith({
  1. ConnectionTypeV2? connectionType,
  2. String? serialNumber,
  3. String? controllerPin,
  4. String? displayName,
  5. DeviceAddressV2? generatorAddress,
  6. String? homeownerFirstName,
  7. String? homeownerLastName,
  8. String? homeownerEmail,
  9. HomeownerConsentActionV2? homeownerConsentAction,
  10. String? homeownerSignature,
  11. bool? hasServiceAgreement,
  12. DateTime? serviceAgreementBeginDate,
  13. ServiceAgreementTermV2? serviceAgreementTerm,
  14. int? serviceAgreementTermMonths,
  15. int? serviceAgreementTermDays,
})

Implementation

DeviceAdditionV2Body copyWith(
    {enums.ConnectionTypeV2? connectionType,
    String? serialNumber,
    String? controllerPin,
    String? displayName,
    DeviceAddressV2? generatorAddress,
    String? homeownerFirstName,
    String? homeownerLastName,
    String? homeownerEmail,
    enums.HomeownerConsentActionV2? homeownerConsentAction,
    String? homeownerSignature,
    bool? hasServiceAgreement,
    DateTime? serviceAgreementBeginDate,
    enums.ServiceAgreementTermV2? serviceAgreementTerm,
    int? serviceAgreementTermMonths,
    int? serviceAgreementTermDays}) {
  return DeviceAdditionV2Body(
      connectionType: connectionType ?? this.connectionType,
      serialNumber: serialNumber ?? this.serialNumber,
      controllerPin: controllerPin ?? this.controllerPin,
      displayName: displayName ?? this.displayName,
      generatorAddress: generatorAddress ?? this.generatorAddress,
      homeownerFirstName: homeownerFirstName ?? this.homeownerFirstName,
      homeownerLastName: homeownerLastName ?? this.homeownerLastName,
      homeownerEmail: homeownerEmail ?? this.homeownerEmail,
      homeownerConsentAction:
          homeownerConsentAction ?? this.homeownerConsentAction,
      homeownerSignature: homeownerSignature ?? this.homeownerSignature,
      hasServiceAgreement: hasServiceAgreement ?? this.hasServiceAgreement,
      serviceAgreementBeginDate:
          serviceAgreementBeginDate ?? this.serviceAgreementBeginDate,
      serviceAgreementTerm: serviceAgreementTerm ?? this.serviceAgreementTerm,
      serviceAgreementTermMonths:
          serviceAgreementTermMonths ?? this.serviceAgreementTermMonths,
      serviceAgreementTermDays:
          serviceAgreementTermDays ?? this.serviceAgreementTermDays);
}