// Create takes the representation of a daemonSet and creates it.  Returns the server's representation of the daemonSet, and an error, if there is any.
164018
func (c *FakeDaemonSets) Create(daemonSet *v1beta2.DaemonSet) (result *v1beta2.DaemonSet, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewCreateAction(daemonsetsResource, c.ns, daemonSet), &v1beta2.DaemonSet{})

	if obj == nil {
		return nil, err
	}
	return obj.(*v1beta2.DaemonSet), err
}
802466
func (c *runtimeClasses) Create(runtimeClass *v1alpha1.RuntimeClass) (result *v1alpha1.RuntimeClass, err error) {
	result = &v1alpha1.RuntimeClass{}
	err = c.client.Post().
		Resource("runtimeclasses").
		Body(runtimeClass).
		Do().
		Into(result)
	return
}
615657
func (c *instanceGroups) Create(instanceGroup *kops.InstanceGroup) (result *kops.InstanceGroup, err error) {
	result = &kops.InstanceGroup{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("instancegroups").
		Body(instanceGroup).
		Do().
		Into(result)
	return
}
1036783
func (c *FakeInstanceGroups) Create(instanceGroup *kops.InstanceGroup) (result *kops.InstanceGroup, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewCreateAction(instancegroupsResource, c.ns, instanceGroup), &kops.InstanceGroup{})

	if obj == nil {
		return nil, err
	}
	return obj.(*kops.InstanceGroup), err
}
577657
func (s *ChannelsService) Create(name string) *ChannelsCreateCall {
	var call ChannelsCreateCall
	call.service = s
	call.name = name
	return &call
}
1000238
func (zs *Server) Create(ctx context.Context, filePath string, contents []byte) (topo.Version, error) {
	zkPath := path.Join(zs.root, filePath)

	pathCreated, err := CreateRecursive(ctx, zs.conn, zkPath, contents, 0, zk.WorldACL(PermFile), -1)
	if err != nil {
		return nil, convertError(err, zkPath)
	}

	// Now do a Get to get the version. If the content doesn't
	// match, it means someone else already changed the file,
	// between our Create and Get. It is safer to return an error here,
	// and let the calling process recover if it can.
	data, stat, err := zs.conn.Get(ctx, pathCreated)
	if err != nil {
		return nil, convertError(err, zkPath)
	}
	if !bytes.Equal(data, contents) {
		return nil, fmt.Errorf("file contents changed between zk.Create and zk.Get")
	}

	return ZKVersion(stat.Version), nil
}
465945
func (c *keysets) Create(keyset *kops.Keyset) (result *kops.Keyset, err error) {
	result = &kops.Keyset{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("keysets").
		Body(keyset).
		Do().
		Into(result)
	return
}
1272002
func (l *linuxProcessor) Create(ctx context.Context, eventInfo *common.EventInfo) error {
	// This should never be called for Linux Processes
	return fmt.Errorf("Use start directly for Linux processes. Create not supported")
}
1270948
func Create(name string) *Registry {
	return &Registry{name: name, registrants: map[string]Registrant{}}
}
1155381
func (l *Lambda) create(kind, name string, m map[string]interface{}) {
	l.log(kind, name, m, '+', green)
}
712651
func (m *MachinesClient) Create(ctx context.Context, machine *envelope.Machine,
	memberships []envelope.Membership, token *MachineTokenCreationSegment) (*apitypes.MachineSegment, error) {

	segment := MachineCreationSegment{
		MachineSegment: apitypes.MachineSegment{
			Machine:     machine,
			Memberships: memberships,
		},
		Tokens: []MachineTokenCreationSegment{*token},
	}

	resp := &apitypes.MachineSegment{}
	err := m.client.RoundTrip(ctx, "POST", "/machines", nil, &segment, &resp)
	return resp, err
}
1138491
func (c *middlewares) Create(middleware *v1alpha1.Middleware) (result *v1alpha1.Middleware, err error) {
	result = &v1alpha1.Middleware{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("middlewares").
		Body(middleware).
		Do().
		Into(result)
	return
}
500591
func (runner *runner) CreateSet(set *IPSet, ignoreExistErr bool) error {
	// sets some IPSet fields if not present to their default values.
	set.setIPSetDefaults()

	// Validate ipset before creating
	valid := set.Validate()
	if !valid {
		return fmt.Errorf("error creating ipset since it's invalid")
	}
	return runner.createSet(set, ignoreExistErr)
}
747272
func newDaemonSets(c *ExtensionsClient, namespace string) *daemonSets {
	return &daemonSets{
		client: c,
		ns:     namespace,
	}
}
980103
func (runner *runner) createSet(set *IPSet, ignoreExistErr bool) error {
	args := []string{"create", set.Name, string(set.SetType)}
	if set.SetType == HashIPPortIP || set.SetType == HashIPPort || set.SetType == HashIPPortNet {
		args = append(args,
			"family", set.HashFamily,
			"hashsize", strconv.Itoa(set.HashSize),
			"maxelem", strconv.Itoa(set.MaxElem),
		)
	}
	if set.SetType == BitmapPort {
		args = append(args, "range", set.PortRange)
	}
	if ignoreExistErr {
		args = append(args, "-exist")
	}
	if _, err := runner.exec.Command(IPSetCmd, args...).CombinedOutput(); err != nil {
		return fmt.Errorf("error creating ipset %s, error: %v", set.Name, err)
	}
	return nil
}
1226404
func (s *ServicesService) create(ctx context.Context, svc *Service, groupName string) (*Service, *http.Response, error) {
	resource, _ := url.Parse(servicesResourcePath)

	opts := &sheriff.Options{Groups: []string{groupName}}
	body, err := sheriff.Marshal(opts, svc)

	if err != nil {
		return nil, nil, err
	}

	req, err := s.client.NewRequest(ctx, http.MethodPost, resource, body)

	if err != nil {
		return nil, nil, err
	}

	root := new(Service)

	res, err := s.client.Do(req, root)

	if err != nil {
		return nil, res, err
	}

	return root, res, nil
}
1343846
func Create(ctx context.Context, client client.APIClient, name string, ops ...func(*types.NetworkCreate)) (string, error) {
	return createNetwork(ctx, client, name, ops...)
}