MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates a builder and applies setFunc on it.
(slice any, setFunc func(*OAuthClientCreate, int))
| 1734 | // MapCreateBulk creates a bulk creation builder from the given slice. For each item in the slice, the function creates |
| 1735 | // a builder and applies setFunc on it. |
| 1736 | func (c *OAuthClientClient) MapCreateBulk(slice any, setFunc func(*OAuthClientCreate, int)) *OAuthClientCreateBulk { |
| 1737 | rv := reflect.ValueOf(slice) |
| 1738 | if rv.Kind() != reflect.Slice { |
| 1739 | return &OAuthClientCreateBulk{err: fmt.Errorf("calling to OAuthClientClient.MapCreateBulk with wrong type %T, need slice", slice)} |
| 1740 | } |
| 1741 | builders := make([]*OAuthClientCreate, rv.Len()) |
| 1742 | for i := 0; i < rv.Len(); i++ { |
| 1743 | builders[i] = c.Create() |
| 1744 | setFunc(builders[i], i) |
| 1745 | } |
| 1746 | return &OAuthClientCreateBulk{config: c.config, builders: builders} |
| 1747 | } |
| 1748 | |
| 1749 | // Update returns an update builder for OAuthClient. |
| 1750 | func (c *OAuthClientClient) Update() *OAuthClientUpdate { |