// SetPending sets the Pending field's value.
960652
func (s *DescribeUserResponse) SetPending(v *UserPendingChanges) *DescribeUserResponse {
	s.Pending = v
	return s
}
372721
func (s *ReplicationGroup) SetPendingModifiedValues(v *ReplicationGroupPendingModifiedValues) *ReplicationGroup {
	s.PendingModifiedValues = v
	return s
}
455019
func (s *LabelCountersForWorkteam) SetPendingHuman(v int64) *LabelCountersForWorkteam {
	s.PendingHuman = &v
	return s
}
829208
func (s *ObjectiveStatusCounters) SetPending(v int64) *ObjectiveStatusCounters {
	s.Pending = &v
	return s
}
1131928
func (s *UpdateJobPriorityOutput) SetPriority(v int64) *UpdateJobPriorityOutput {
	s.Priority = &v
	return s
}
83832
func setSpendingForTickets(dbtx *sql.Tx, ticketDbIDs, spendDbIDs []uint64,
	blockHeights []int64, spendTypes []dbtypes.TicketSpendType,
	poolStatuses []dbtypes.TicketPoolStatus) error {
	stmt, err := dbtx.Prepare(internal.SetTicketSpendingInfoForTicketDbID)
	if err != nil {
		return fmt.Errorf("tickets SELECT prepare failed: %v", err)
	}

	rowsAffected := make([]int64, len(ticketDbIDs))
	for i, ticketDbID := range ticketDbIDs {
		rowsAffected[i], err = sqlExecStmt(stmt, "failed to set ticket spending info: ",
			ticketDbID, blockHeights[i], spendDbIDs[i], spendTypes[i], poolStatuses[i])
		if err != nil {
			_ = stmt.Close()
			return err
		}
		if rowsAffected[i] != 1 {
			log.Warnf("Updated spending info for %d tickets, expecting just 1!",
				rowsAffected[i])
		}
	}

	return stmt.Close()
}
1133677
func (s *GrantListEntry) SetIssuingAccount(v string) *GrantListEntry {
	s.IssuingAccount = &v
	return s
}
96294
func (s *Cluster) SetPendingTasksCount(v int64) *Cluster {
	s.PendingTasksCount = &v
	return s
}
773535
func (s *JobQueueDetail) SetPriority(v int64) *JobQueueDetail {
	s.Priority = &v
	return s
}
275133
func PutPendingCount(c context.Context, master, builder string, count int) error {
	return datastore.Put(c, &builderEntity{
		MasterKey:    datastore.MakeKey(c, masterKind, master),
		Name:         builder,
		PendingCount: count,
	})
}
572563
func (builder *RequestBuilder) SetStreaming(streaming bool) *RequestBuilder {
	builder.Request.Streaming = streaming
	return builder
}
513389
func (ec *EthereumClient) GetPendingNonceAt(ctx *Context, account *Address) (nonce int64, _ error) {
	rawNonce, err := ec.client.PendingNonceAt(ctx.context, account.address)
	return int64(rawNonce), err
}
1252773
func (c Client) AddPendingResources(args AddPendingResourcesArgs) (pendingIDs []string, err error) {
	apiArgs, err := newAddPendingResourcesArgs(args.ApplicationID, args.CharmID, args.CharmStoreMacaroon, args.Resources)
	if err != nil {
		return nil, errors.Trace(err)
	}

	var result params.AddPendingResourcesResult
	if err := c.FacadeCall("AddPendingResources", &apiArgs, &result); err != nil {
		return nil, errors.Trace(err)
	}
	if result.Error != nil {
		err := common.RestoreError(result.Error)
		return nil, errors.Trace(err)
	}

	if len(result.PendingIDs) != len(args.Resources) {
		return nil, errors.Errorf("bad data from server: expected %d IDs, got %d", len(args.Resources), len(result.PendingIDs))
	}
	for i, id := range result.PendingIDs {
		if id == "" {
			return nil, errors.Errorf("bad data from server: got an empty ID for resource %q", args.Resources[i].Name)
		}
		// TODO(ericsnow) Do other validation?
	}

	return result.PendingIDs, nil
}
259953
func (s *InstancesCount) SetPending(v int64) *InstancesCount {
	s.Pending = &v
	return s
}
794203
func (w *WalletState) AddPendingTx(ctx context.Context, accountID stellar1.AccountID, txID stellar1.TransactionID, seqno uint64) error {
	a, ok := w.accountState(accountID)
	if !ok {
		return fmt.Errorf("AddPendingTx: account id %q not in wallet state", accountID)
	}

	w.G().Log.CDebugf(ctx, "WalletState: account %s adding pending tx %s/%d", accountID, txID, seqno)

	return a.AddPendingTx(ctx, txID, seqno)
}
444382
func (s *CacheCluster) SetPendingModifiedValues(v *PendingModifiedValues) *CacheCluster {
	s.PendingModifiedValues = v
	return s
}
176378
func (w *walletAPIHandler) setInflation(ctx context.Context, c Call, wr io.Writer) error {
	var opts inflationOptions
	if err := unmarshalOptions(c, &opts); err != nil {
		return w.encodeErr(c, err, wr)
	}

	destination, err := getInflationDestinationAddrFromString(w.cli, opts.AccountIDConvert(), opts.Destination)
	if err != nil {
		return w.encodeErr(c, err, wr)
	}

	arg := stellar1.SetInflationDestinationLocalArg{
		AccountID:   opts.AccountIDConvert(),
		Destination: destination,
	}
	if err := w.cli.SetInflationDestinationLocal(ctx, arg); err != nil {
		return w.encodeErr(c, err, wr)
	}

	// get it for display
	inflation, err := w.getInflationLocal(ctx, opts.AccountIDConvert())
	if err != nil {
		return w.encodeErr(c, err, wr)
	}

	return w.encodeResult(c, inflation, wr)
}