Balance Sheet Components - Schedule of Accounts Receivable, Net (Details) - USD ($) $ in Thousands |
Dec. 31, 2018 |
Dec. 31, 2017 |
Dec. 31, 2016 |
|---|---|---|---|
| Valuation And Qualifying Accounts Disclosure [Line Items] | |||
| Gross accounts receivable | $ 204,975 | $ 138,292 | |
| Allowance for accounts receivable | (21,897) | (17,739) | |
| Total Accounts Receivable—net of allowances | 183,078 | 120,553 | |
| Allowance for Sales Returns | |||
| Valuation And Qualifying Accounts Disclosure [Line Items] | |||
| Allowance for accounts receivable | (7,335) | (6,907) | $ (6,916) |
| Allowance for Sales Incentives | |||
| Valuation And Qualifying Accounts Disclosure [Line Items] | |||
| Allowance for accounts receivable | (13,750) | (10,442) | $ (8,503) |
| Other Allowances | |||
| Valuation And Qualifying Accounts Disclosure [Line Items] | |||
| Allowance for accounts receivable | $ (812) | $ (390) |