// Create creates a new project with the given name within the given org
186022
func (p *ProjectsClient) Create(ctx context.Context, org *identity.ID, name string) (*envelope.Project, error) {
	project := projectCreateRequest{}
	project.Body.OrgID = org
	project.Body.Name = name

	res := envelope.Project{}
	err := p.client.RoundTrip(ctx, "POST", "/projects", nil, &project, &res)
	return &res, err
}
1060073
func (doc *Document) Create(data []byte) error {
	docResp, err := doc.createOrUpdate(data)

	if err != nil {
		return err
	}

	doc.Id = docResp.Id
	doc.Rev = docResp.Rev
	return err
}
849652
func (d *DevTools) Create(ctx context.Context) (*Target, error) {
	return d.CreateURL(ctx, "")
}
472767
func (c *examples) Create(example *v1.Example) (result *v1.Example, err error) {
	result = &v1.Example{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("examples").
		Body(example).
		Do().
		Into(result)
	return
}
458926
func (t *TeamsClient) Create(ctx context.Context, orgID *identity.ID, name string,
	teamType primitive.TeamType) (*envelope.Team, error) {
	if orgID == nil {
		return nil, errors.New("invalid org")
	}

	teamBody := primitive.Team{
		Name:     name,
		OrgID:    orgID,
		TeamType: teamType,
	}

	ID, err := identity.NewMutable(&teamBody)
	if err != nil {
		return nil, err
	}

	team := envelope.Team{
		ID:      &ID,
		Version: 1,
		Body:    &teamBody,
	}

	result := &envelope.Team{}
	err = t.client.RoundTrip(ctx, "POST", "/teams", nil, &team, result)
	return result, err
}
116285
func (r *GormWorkItemTypeRepository) Create(ctx context.Context, spaceTemplateID uuid.UUID, id *uuid.UUID, extendedTypeID *uuid.UUID, name string, description *string, icon string, fields FieldDefinitions, canConstruct bool) (*WorkItemType, error) {
	wit := WorkItemType{
		SpaceTemplateID: spaceTemplateID,
		Name:            name,
		Description:     description,
		Icon:            icon,
		Fields:          fields,
		CanConstruct:    canConstruct,
	}
	if id != nil {
		wit.ID = *id
	} else {
		wit.ID = uuid.NewV4()
	}
	if extendedTypeID != nil && *extendedTypeID != uuid.Nil {
		wit.Extends = *extendedTypeID
	}
	return r.CreateFromModel(ctx, wit)
}
562618
func (s *IndicesPutTemplateService) Create(create bool) *IndicesPutTemplateService {
	s.create = &create
	return s
}
578952
func (c *appProjects) Create(appProject *v1alpha1.AppProject) (result *v1alpha1.AppProject, err error) {
	result = &v1alpha1.AppProject{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("appprojects").
		Body(appProject).
		Do().
		Into(result)
	return
}
974035
func (c *ProjectsClient) Create(ctx context.Context, createProject *CreateProject) (*Project, error) {
	p := "/projects"

	req, err := c.backend.NewRequest(http.MethodPost, p, nil, createProject)
	if err != nil {
		return nil, err
	}

	var resp Project
	_, err = c.backend.Do(ctx, req, &resp, func(code int) error {
		return &Error{}
	})
	if err != nil {
		return nil, err
	}

	return &resp, nil
}
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
}
751834
func (c *clusters) Create(cluster *v1alpha2.Cluster) (result *v1alpha2.Cluster, err error) {
	result = &v1alpha2.Cluster{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("clusters").
		Body(cluster).
		Do().
		Into(result)
	return
}
1068676
func (s *ServicesClient) Create(ctx context.Context, orgID, projectID *identity.ID, name string) error {
	if orgID == nil || projectID == nil {
		return errors.New("invalid org or project")
	}

	serviceBody := primitive.Service{
		Name:      name,
		OrgID:     orgID,
		ProjectID: projectID,
	}

	ID, err := identity.NewMutable(&serviceBody)
	if err != nil {
		return err
	}

	service := envelope.Service{
		ID:      &ID,
		Version: 1,
		Body:    &serviceBody,
	}

	return s.client.RoundTrip(ctx, "POST", "/services", nil, service, nil)
}
710304
func (c *projectRequests) Create(projectRequest *project.ProjectRequest) (result *project.Project, err error) {
	result = &project.Project{}
	err = c.client.Post().
		Resource("projectrequests").
		Body(projectRequest).
		Do().
		Into(result)
	return
}
305641
func (c *events) Create(event *api.Event) (result *api.Event, err error) {
	result = &api.Event{}
	err = c.client.Post().
		Namespace(c.ns).
		Resource("events").
		Body(event).
		Do().
		Into(result)
	return
}
741773
func (s *ProjectsService) CreateProject(projectName string, input *ProjectInput) (*ProjectInfo, *Response, error) {
	u := fmt.Sprintf("projects/%s/", url.QueryEscape(projectName))

	v := new(ProjectInfo)
	resp, err := s.client.Call("PUT", u, input, v)
	return v, resp, err
}
1156524
func (namespace *HostComputeNamespace) Create() (*HostComputeNamespace, error) {
	logrus.Debugf("hcn::HostComputeNamespace::Create id=%s", namespace.Id)

	jsonString, err := json.Marshal(namespace)
	if err != nil {
		return nil, err
	}

	logrus.Debugf("hcn::HostComputeNamespace::Create JSON: %s", jsonString)
	namespace, hcnErr := createNamespace(string(jsonString))
	if hcnErr != nil {
		return nil, hcnErr
	}
	return namespace, nil
}
303084
func (c *FakeProjectRequests) Create(projectRequest *project.ProjectRequest) (result *project.Project, err error) {
	obj, err := c.Fake.
		Invokes(testing.NewRootCreateAction(projectrequestsResource, projectRequest), &project.Project{})
	if obj == nil {
		return nil, err
	}
	return obj.(*project.Project), err
}