package protocol type SetModemOptions struct { Apn *string Type *string Username *string Password *string } type SetModemOptionsFunc func(opts *SetModemOptions) func NewSetModemOptions(funcs ...SetModemOptionsFunc) *SetModemOptions { opts := &SetModemOptions{} for _, fn := range funcs { fn(opts) } return opts } func WithApn(value string) SetModemOptionsFunc { return func(opts *SetModemOptions) { opts.Apn = &value } } func WithType(value string) SetModemOptionsFunc { return func(opts *SetModemOptions) { opts.Type = &value } } func WithUsername(value string) SetModemOptionsFunc { return func(opts *SetModemOptions) { opts.Username = &value } } func WithPassword(value string) SetModemOptionsFunc { return func(opts *SetModemOptions) { opts.Password = &value } }