// One implements Oner.
770054
func (p syncParams) One() (*imagedownloads.Metadata, error) {
	if err := p.exists(); err != nil {
		return nil, errors.Trace(err)
	}
	return imagedownloads.One(p.arch, p.series, p.stream, p.fType, p.srcFunc)
}
127865
func (facade *Facade) onePhase(tagString string) (string, error) {
	if err := facade.auth(tagString); err != nil {
		return "", errors.Trace(err)
	}
	phase, err := facade.backend.MigrationPhase()
	if err != nil {
		return "", errors.Trace(err)
	}
	return phase.String(), nil
}
750532
func (*Value) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
	return _Value_OneofMarshaler, _Value_OneofUnmarshaler, _Value_OneofSizer, []interface{}{
		(*Value_NullValue)(nil),
		(*Value_BooleanValue)(nil),
		(*Value_IntegerValue)(nil),
		(*Value_DoubleValue)(nil),
		(*Value_TimestampValue)(nil),
		(*Value_KeyValue)(nil),
		(*Value_StringValue)(nil),
		(*Value_BlobValue)(nil),
		(*Value_GeoPointValue)(nil),
		(*Value_EntityValue)(nil),
		(*Value_ArrayValue)(nil),
	}
}
278959
func OnError(runner ifrit.Runner, err error, errors ...error) ifrit.Runner {
	errors = append(errors, err)
	return &Restarter{
		Runner: runner,
		Load: func(runner ifrit.Runner, err error) ifrit.Runner {
			for _, restartableError := range errors {
				if err == restartableError {
					return runner
				}
			}
			return nil
		},
	}
}
56559
func OnesCount32(x uint32) int {
	return int(pop8tab[x>>24] + pop8tab[x>>16&0xff] + pop8tab[x>>8&0xff] + pop8tab[x&0xff])
}
199225
func (*Attempt_Data) XXX_OneofWrappers() []interface{} {
	return []interface{}{
		(*Attempt_Data_Scheduling_)(nil),
		(*Attempt_Data_Executing_)(nil),
		(*Attempt_Data_Waiting_)(nil),
		(*Attempt_Data_Finished_)(nil),
		(*Attempt_Data_AbnormalFinish)(nil),
	}
}
774394
func OneConstOf(consts ...interface{}) gopter.Gen {
	if len(consts) == 0 {
		return Fail(reflect.TypeOf(nil))
	}
	return func(genParams *gopter.GenParameters) *gopter.GenResult {
		idx := genParams.Rng.Intn(len(consts))
		return gopter.NewGenResult(consts[idx], gopter.NoShrinker)
	}
}
691772
func One(f interface{}, a interface{}) interface{} {
	if f == nil {
		panic("f is required")
	}
	if a == nil {
		panic("a is required and cannot be nil")
	}

	fType := reflect.TypeOf(f)
	if fType.Kind() != reflect.Func {
		panic(fmt.Sprintf("%v (%v) is not a function", f, fType))
	}

	if fType.IsVariadic() {
		panic(fmt.Sprintf("%v (%v) is variadic", f, fType))
	}

	in := args(fType)
	out := returns(fType)
	if len(in) == 0 {
		panic(fmt.Sprintf("%v (%v) does not accept enough arguments to curry in %v", f, fType, a))
	}

	fVal := reflect.ValueOf(f)
	aVal := reflect.ValueOf(a)
	newFType := reflect.FuncOf(in[1:], out, false)
	return reflect.MakeFunc(newFType, func(args []reflect.Value) []reflect.Value {
		newArgs := make([]reflect.Value, 0, fType.NumIn())
		newArgs = append(newArgs, aVal)
		newArgs = append(newArgs, args...)
		return fVal.Call(newArgs)
	}).Interface()
}
842312
func (result ErrorResults) OneError() error {
	if n := len(result.Results); n != 1 {
		return fmt.Errorf("expected 1 result, got %d", n)
	}
	if err := result.Results[0].Error; err != nil {
		return err
	}
	return nil
}
461934
func (r *ViewResults) One(valuePtr interface{}) error {
	if !r.Next(valuePtr) {
		err := r.Close()
		if err != nil {
			return err
		}
		return noResultsError{}
	}

	// We have to purge the remaining rows in order to get to the remaining
	// response attributes
	for r.NextBytes() != nil {
	}

	err := r.Close()
	if err != nil {
		return err
	}

	return nil
}
318316
func OnesCount(x uint) int {
	if UintSize == 32 {
		return OnesCount32(uint32(x))
	}
	return OnesCount64(uint64(x))
}
716816
func (r *RootService) One() (root *Root, result *Result) {
	root = &Root{HALResource: &hypermedia.HALResource{}}
	result = r.client.get(r.URL, &root)
	if root != nil {
		// Cached hyperlinks
		root.PullsURL = hypermedia.Hyperlink(PullRequestsURL)
	}

	return
}
82867
func (configMgr *ConfigurationManager) OnEvent(event *core.Event) {
	err := configMgr.updateEvent(event)
	if err != nil {
		openlogging.GetLogger().Error("failed in updating event with error: " + err.Error())
	}
}
810872
func (s Signature) Single() bool {
	err, r := validSingle(s.str, 0)
	return err != nil && r == ""
}
533758
func (m *MockQuery) One(arg0 interface{}) error {
	ret := m.ctrl.Call(m, "One", arg0)
	ret0, _ := ret[0].(error)
	return ret0
}
323991
func (g *Generator) OneIntOf(values ...int) int {
	i := g.Int(0, len(values)-1)
	return values[i]
}
1086209
func (r *AnalyticsDeferredResultHandle) One(valuePtr interface{}) error {
	if !r.Next(valuePtr) {
		err := r.Close()
		if err != nil {
			return err
		}
		// return ErrNoResults
	}

	// Ignore any errors occurring after we already have our result
	err := r.Close()
	if err != nil {
		// Return no error as we got the one result already.
		return nil
	}

	return nil
}