Ejemplo n.º 1
0
func DeepCopy_api_CommonSpec(in CommonSpec, out *CommonSpec, c *conversion.Cloner) error {
	out.ServiceAccount = in.ServiceAccount
	if err := DeepCopy_api_BuildSource(in.Source, &out.Source, c); err != nil {
		return err
	}
	if in.Revision != nil {
		in, out := in.Revision, &out.Revision
		*out = new(SourceRevision)
		if err := DeepCopy_api_SourceRevision(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Revision = nil
	}
	if err := DeepCopy_api_BuildStrategy(in.Strategy, &out.Strategy, c); err != nil {
		return err
	}
	if err := DeepCopy_api_BuildOutput(in.Output, &out.Output, c); err != nil {
		return err
	}
	if err := api.DeepCopy_api_ResourceRequirements(in.Resources, &out.Resources, c); err != nil {
		return err
	}
	if err := DeepCopy_api_BuildPostCommitSpec(in.PostCommit, &out.PostCommit, c); err != nil {
		return err
	}
	if in.CompletionDeadlineSeconds != nil {
		in, out := in.CompletionDeadlineSeconds, &out.CompletionDeadlineSeconds
		*out = new(int64)
		**out = *in
	} else {
		out.CompletionDeadlineSeconds = nil
	}
	return nil
}
func DeepCopy_api_DeploymentStrategy(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*DeploymentStrategy)
		out := out.(*DeploymentStrategy)
		out.Type = in.Type
		if in.CustomParams != nil {
			in, out := &in.CustomParams, &out.CustomParams
			*out = new(CustomDeploymentStrategyParams)
			if err := DeepCopy_api_CustomDeploymentStrategyParams(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.CustomParams = nil
		}
		if in.RecreateParams != nil {
			in, out := &in.RecreateParams, &out.RecreateParams
			*out = new(RecreateDeploymentStrategyParams)
			if err := DeepCopy_api_RecreateDeploymentStrategyParams(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.RecreateParams = nil
		}
		if in.RollingParams != nil {
			in, out := &in.RollingParams, &out.RollingParams
			*out = new(RollingDeploymentStrategyParams)
			if err := DeepCopy_api_RollingDeploymentStrategyParams(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.RollingParams = nil
		}
		if err := pkg_api.DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
			return err
		}
		if in.Labels != nil {
			in, out := &in.Labels, &out.Labels
			*out = make(map[string]string)
			for key, val := range *in {
				(*out)[key] = val
			}
		} else {
			out.Labels = nil
		}
		if in.Annotations != nil {
			in, out := &in.Annotations, &out.Annotations
			*out = make(map[string]string)
			for key, val := range *in {
				(*out)[key] = val
			}
		} else {
			out.Annotations = nil
		}
		return nil
	}
}
func DeepCopy_api_CommonSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*CommonSpec)
		out := out.(*CommonSpec)
		out.ServiceAccount = in.ServiceAccount
		if err := DeepCopy_api_BuildSource(&in.Source, &out.Source, c); err != nil {
			return err
		}
		if in.Revision != nil {
			in, out := &in.Revision, &out.Revision
			*out = new(SourceRevision)
			if err := DeepCopy_api_SourceRevision(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.Revision = nil
		}
		if err := DeepCopy_api_BuildStrategy(&in.Strategy, &out.Strategy, c); err != nil {
			return err
		}
		if err := DeepCopy_api_BuildOutput(&in.Output, &out.Output, c); err != nil {
			return err
		}
		if err := pkg_api.DeepCopy_api_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
			return err
		}
		if err := DeepCopy_api_BuildPostCommitSpec(&in.PostCommit, &out.PostCommit, c); err != nil {
			return err
		}
		if in.CompletionDeadlineSeconds != nil {
			in, out := &in.CompletionDeadlineSeconds, &out.CompletionDeadlineSeconds
			*out = new(int64)
			**out = **in
		} else {
			out.CompletionDeadlineSeconds = nil
		}
		if in.NodeSelector != nil {
			in, out := &in.NodeSelector, &out.NodeSelector
			*out = make(map[string]string)
			for key, val := range *in {
				(*out)[key] = val
			}
		} else {
			out.NodeSelector = nil
		}
		return nil
	}
}