* Copy struct (shallow copy) * @this {!Account} * @param {!Account} other Other struct * @returns {!Account} This struct
(other)
| 2770 | * @returns {!Account} This struct |
| 2771 | */ |
| 2772 | copy (other) { |
| 2773 | if (other.id != null) { |
| 2774 | this.id = other.id |
| 2775 | } else { |
| 2776 | this.id = undefined |
| 2777 | } |
| 2778 | if (other.name != null) { |
| 2779 | this.name = other.name |
| 2780 | } else { |
| 2781 | this.name = undefined |
| 2782 | } |
| 2783 | if (other.state != null) { |
| 2784 | this.state = State.fromObject(other.state) |
| 2785 | } else { |
| 2786 | this.state = undefined |
| 2787 | } |
| 2788 | if (other.wallet != null) { |
| 2789 | this.wallet = Balance.fromObject(other.wallet) |
| 2790 | } else { |
| 2791 | this.wallet = undefined |
| 2792 | } |
| 2793 | if (other.asset != null) { |
| 2794 | this.asset = Balance.fromObject(other.asset) |
| 2795 | } else { |
| 2796 | this.asset = undefined |
| 2797 | } |
| 2798 | if (other.orders != null) { |
| 2799 | this.orders = [] |
| 2800 | for (let item of other.orders) { |
| 2801 | if (item != null) { |
| 2802 | let tempItem |
| 2803 | tempItem = Order.fromObject(item) |
| 2804 | this.orders.push(tempItem) |
| 2805 | } else { |
| 2806 | this.orders.push(undefined) |
| 2807 | } |
| 2808 | } |
| 2809 | } else { |
| 2810 | this.orders = undefined |
| 2811 | } |
| 2812 | return this |
| 2813 | } |
| 2814 | |
| 2815 | /** |
| 2816 | * Clone struct (deep clone) |
nothing calls this directly
no test coverage detected