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 := apitypes.Service{
		ID:      &ID,
		Version: 1,
		Body:    &serviceBody,
	}

	req, _, err := s.client.NewRequest("POST", "/services", nil, service, true)
	if err != nil {
		return err
	}

	_, err = s.client.Do(ctx, req, nil, nil, nil)
	return err
}
// Create performs a request to create a new service object
Create performs a request to create a new service object
// Create performs a request to create a new service object
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 := apitypes.Service{
		ID:      &ID,
		Version: 1,
		Body:    &serviceBody,
	}
	req, _, err := s.client.NewRequest("POST", "/services", nil, service, true)
	if err != nil {
		return err
	}
	_, err = s.client.Do(ctx, req, nil, nil, nil)
	return err
}
func ( s * ServicesClient ) Create ( ctx context . Context , orgID , projectID * identity . ID , name string ) error { if orgID == nil || projectID == nil { return errors . New ( " " ) } serviceBody := primitive . Service { Name : name , OrgID : orgID , ProjectID : projectID , } ID , err := identity . NewMutable ( & serviceBody ) if err != nil { return err } service := apitypes . Service { ID : & ID , Version : 1 , Body : & serviceBody , } req , _ , err := s . client . NewRequest ( " " , " " , nil , service , true ) if err != nil { return err } _ , err = s . client . Do ( ctx , req , nil , nil , nil ) return err }
Create performs a request to create a new service object
Create performs a request to create a new service object