コード例 #1
0
ファイル: deep_copy_generated.go プロジェクト: jdnieto/origin
func DeepCopy_v1_CommonSpec(in CommonSpec, out *CommonSpec, c *conversion.Cloner) error {
	out.ServiceAccount = in.ServiceAccount
	if err := DeepCopy_v1_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_v1_SourceRevision(*in, *out, c); err != nil {
			return err
		}
	} else {
		out.Revision = nil
	}
	if err := DeepCopy_v1_BuildStrategy(in.Strategy, &out.Strategy, c); err != nil {
		return err
	}
	if err := DeepCopy_v1_BuildOutput(in.Output, &out.Output, c); err != nil {
		return err
	}
	if err := api_v1.DeepCopy_v1_ResourceRequirements(in.Resources, &out.Resources, c); err != nil {
		return err
	}
	if err := DeepCopy_v1_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
}
コード例 #2
0
func DeepCopy_v1_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_v1_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_v1_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_v1_RollingDeploymentStrategyParams(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.RollingParams = nil
		}
		if err := api_v1.DeepCopy_v1_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
	}
}
コード例 #3
0
func DeepCopy_v1_CommonSpec(in interface{}, out interface{}, c *conversion.Cloner) error {
	{
		in := in.(*CommonSpec)
		out := out.(*CommonSpec)
		out.ServiceAccount = in.ServiceAccount
		if err := DeepCopy_v1_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_v1_SourceRevision(*in, *out, c); err != nil {
				return err
			}
		} else {
			out.Revision = nil
		}
		if err := DeepCopy_v1_BuildStrategy(&in.Strategy, &out.Strategy, c); err != nil {
			return err
		}
		if err := DeepCopy_v1_BuildOutput(&in.Output, &out.Output, c); err != nil {
			return err
		}
		if err := api_v1.DeepCopy_v1_ResourceRequirements(&in.Resources, &out.Resources, c); err != nil {
			return err
		}
		if err := DeepCopy_v1_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(OptionalNodeSelector)
			for key, val := range *in {
				(*out)[key] = val
			}
		} else {
			out.NodeSelector = nil
		}
		return nil
	}
}