// Convert_project_ProjectRequest_To_v1_ProjectRequest is an autogenerated conversion function.
179085
func Convert_project_ProjectRequest_To_v1_ProjectRequest(in *project.ProjectRequest, out *v1.ProjectRequest, s conversion.Scope) error {
	return autoConvert_project_ProjectRequest_To_v1_ProjectRequest(in, out, s)
}
659205
func (c *Client) ActivateProject(p *ActivateProjectParameter) (*Project, error) {
	obj, err := c.Request("activateProject", convertParamToMap(p))
	if err != nil {
		return nil, err
	}
	return obj.(*Project), err
}
89236
func Convert_admission_AdmissionRequest_To_v1beta1_AdmissionRequest(in *admission.AdmissionRequest, out *v1beta1.AdmissionRequest, s conversion.Scope) error {
	return autoConvert_admission_AdmissionRequest_To_v1beta1_AdmissionRequest(in, out, s)
}
1227457
func (s *ProjectsService) GetProject(projectName string) (*ProjectInfo, *Response, error) {
	u := fmt.Sprintf("projects/%s", url.QueryEscape(projectName))

	v := new(ProjectInfo)
	resp, err := s.client.Call("GET", u, nil, v)
	return v, resp, err
}
745813
func Convert_v1_ProjectConfig_To_config_ProjectConfig(in *v1.ProjectConfig, out *config.ProjectConfig, s conversion.Scope) error {
	return autoConvert_v1_ProjectConfig_To_config_ProjectConfig(in, out, s)
}
219593
func Convert_authentication_TokenRequest_To_v1_TokenRequest(in *authentication.TokenRequest, out *v1.TokenRequest, s conversion.Scope) error {
	return autoConvert_authentication_TokenRequest_To_v1_TokenRequest(in, out, s)
}
450669
func Convert_project_Project_To_v1_Project(in *project.Project, out *v1.Project, s conversion.Scope) error {
	return autoConvert_project_Project_To_v1_Project(in, out, s)
}
358543
func Convert_config_GrantConfig_To_v1_GrantConfig(in *config.GrantConfig, out *v1.GrantConfig, s conversion.Scope) error {
	return autoConvert_config_GrantConfig_To_v1_GrantConfig(in, out, s)
}
1333419
func Convert_core_ResourceRequirements_To_v1_ResourceRequirements(in *core.ResourceRequirements, out *v1.ResourceRequirements, s conversion.Scope) error {
	return autoConvert_core_ResourceRequirements_To_v1_ResourceRequirements(in, out, s)
}
672413
func (api *TenantsAPI) GetProjects(tenantId string, options *ProjectGetOptions) (result *ProjectList, err error) {
	uri := api.client.Endpoint + tenantUrl + "/" + tenantId + "/projects"
	if options != nil {
		uri += getQueryString(options)
	}
	res, err := api.client.restClient.GetList(api.client.Endpoint, uri, api.client.options.TokenOptions)
	if err != nil {
		return
	}

	result = &(ProjectList{})
	err = json.Unmarshal(res, result)
	return
}
930863
func (p *RBACPolicyEnforcer) getProjectFromRequest(rvals ...interface{}) *v1alpha1.AppProject {
	if len(rvals) != 4 {
		return nil
	}
	getProjectByName := func(projName string) *v1alpha1.AppProject {
		proj, err := p.projLister.Get(projName)
		if err != nil {
			return nil
		}
		return proj
	}
	if res, ok := rvals[1].(string); ok {
		if obj, ok := rvals[3].(string); ok {
			switch res {
			case ResourceApplications:
				if objSplit := strings.Split(obj, "/"); len(objSplit) == 2 {
					return getProjectByName(objSplit[0])
				}
			case ResourceProjects:
				// we also automatically give project tokens and groups 'get' access to the project
				return getProjectByName(obj)
			}
		}
	}
	return nil
}
873130
func (c *Client) DeleteProject(projectName string) (result ResultModel, err error) {

	requestUrl := c.GetUrl("projects", "", projectName)
	requestPath := GetRequestPath("projects", "", projectName)

	responseResult, err := c.GetResponseJson("DELETE", requestUrl, requestPath, "")

	if err != nil {
		return result, err
	}

	err = json.Unmarshal([]byte(responseResult), &result)

	return result, err

}
12036
func Convert_core_ExecAction_To_v1_ExecAction(in *core.ExecAction, out *v1.ExecAction, s conversion.Scope) error {
	return autoConvert_core_ExecAction_To_v1_ExecAction(in, out, s)
}
916187
func Convert_v1_VolumeProjection_To_core_VolumeProjection(in *v1.VolumeProjection, out *core.VolumeProjection, s conversion.Scope) error {
	return autoConvert_v1_VolumeProjection_To_core_VolumeProjection(in, out, s)
}
1100309
func Convert_v1_ProjectStatus_To_project_ProjectStatus(in *v1.ProjectStatus, out *project.ProjectStatus, s conversion.Scope) error {
	return autoConvert_v1_ProjectStatus_To_project_ProjectStatus(in, out, s)
}
983125
func (s *ProjectService) UpdateProject(p *UpdateProjectParams) (*UpdateProjectResponse, error) {
	resp, err := s.cs.newRequest("updateProject", p.toURLValues())
	if err != nil {
		return nil, err
	}

	var r UpdateProjectResponse
	if err := json.Unmarshal(resp, &r); err != nil {
		return nil, err
	}

	// If we have a async client, we need to wait for the async result
	if s.cs.async {
		b, err := s.cs.GetAsyncJobResult(r.JobID, s.cs.timeout)
		if err != nil {
			if err == AsyncTimeoutErr {
				return &r, err
			}
			return nil, err
		}

		b, err = getRawValue(b)
		if err != nil {
			return nil, err
		}

		if err := json.Unmarshal(b, &r); err != nil {
			return nil, err
		}
	}

	return &r, nil
}
276404
func Convert_core_Endpoints_To_v1_Endpoints(in *core.Endpoints, out *v1.Endpoints, s conversion.Scope) error {
	return autoConvert_core_Endpoints_To_v1_Endpoints(in, out, s)
}