func autoConvert_v1_SubjectAccessReview_To_api_SubjectAccessReview(in *SubjectAccessReview, out *api.SubjectAccessReview, s conversion.Scope) error {
	if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
		return err
	}
	out.User = in.User
	// INFO: in.GroupsSlice opted out of conversion generation
	out.Scopes = *(*[]string)(unsafe.Pointer(&in.Scopes))
	return nil
}
Example #2
0
func autoConvert_v1_SubjectAccessReview_To_api_SubjectAccessReview(in *SubjectAccessReview, out *api.SubjectAccessReview, s conversion.Scope) error {
	if err := pkg_api.Convert_unversioned_TypeMeta_To_unversioned_TypeMeta(&in.TypeMeta, &out.TypeMeta, s); err != nil {
		return err
	}
	if err := Convert_v1_Action_To_api_Action(&in.Action, &out.Action, s); err != nil {
		return err
	}
	out.User = in.User
	if in.Scopes != nil {
		in, out := &in.Scopes, &out.Scopes
		*out = make([]string, len(*in))
		copy(*out, *in)
	} else {
		out.Scopes = nil
	}
	return nil
}