Esempio n. 1
0
func autoConvert_v1_SubjectRulesReviewStatus_To_api_SubjectRulesReviewStatus(in *SubjectRulesReviewStatus, out *api.SubjectRulesReviewStatus, s conversion.Scope) error {
	if in.Rules != nil {
		in, out := &in.Rules, &out.Rules
		*out = make([]api.PolicyRule, len(*in))
		for i := range *in {
			if err := Convert_v1_PolicyRule_To_api_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Rules = nil
	}
	out.EvaluationError = in.EvaluationError
	return nil
}
Esempio n. 2
0
func autoConvert_v1_SubjectRulesReviewStatus_To_api_SubjectRulesReviewStatus(in *SubjectRulesReviewStatus, out *authorization_api.SubjectRulesReviewStatus, s conversion.Scope) error {
	if defaulting, found := s.DefaultingInterface(reflect.TypeOf(*in)); found {
		defaulting.(func(*SubjectRulesReviewStatus))(in)
	}
	if in.Rules != nil {
		in, out := &in.Rules, &out.Rules
		*out = make([]authorization_api.PolicyRule, len(*in))
		for i := range *in {
			if err := Convert_v1_PolicyRule_To_api_PolicyRule(&(*in)[i], &(*out)[i], s); err != nil {
				return err
			}
		}
	} else {
		out.Rules = nil
	}
	out.EvaluationError = in.EvaluationError
	return nil
}