// Convert_build_BinaryBuildRequestOptions_To_v1_BinaryBuildRequestOptions is an autogenerated conversion function.
167171
func Convert_build_BinaryBuildRequestOptions_To_v1_BinaryBuildRequestOptions(in *build.BinaryBuildRequestOptions, out *v1.BinaryBuildRequestOptions, s conversion.Scope) error {
	return autoConvert_build_BinaryBuildRequestOptions_To_v1_BinaryBuildRequestOptions(in, out, s)
}
311173
func (r *SystemBootOptionsResponse) MarshalBinary() ([]byte, error) {
	buf := make([]byte, 3+len(r.Data))
	buf[0] = byte(r.CompletionCode)
	buf[1] = r.Version
	buf[2] = r.Param
	copy(buf[3:], r.Data)
	return buf, nil
}
624486
func Convert_v1_BuildStrategy_To_build_BuildStrategy(in *v1.BuildStrategy, out *build.BuildStrategy, s conversion.Scope) error {
	return autoConvert_v1_BuildStrategy_To_build_BuildStrategy(in, out, s)
}
1025130
func (p LinkADRAnsPayload) MarshalBinary() ([]byte, error) {
	var b byte
	if p.ChannelMaskACK {
		b = b ^ (1 << 0)
	}
	if p.DataRateACK {
		b = b ^ (1 << 1)
	}
	if p.PowerACK {
		b = b ^ (1 << 2)
	}
	return []byte{b}, nil
}
1273239
func Convert_build_BuildLogOptions_To_v1_BuildLogOptions(in *build.BuildLogOptions, out *v1.BuildLogOptions, s conversion.Scope) error {
	return autoConvert_build_BuildLogOptions_To_v1_BuildLogOptions(in, out, s)
}
457115
func (m *RequestDeniedError) MarshalBinary() ([]byte, error) {
	if m == nil {
		return nil, nil
	}
	return swag.WriteJSON(m)
}
444732
func Convert_build_SecretBuildSource_To_v1_SecretBuildSource(in *build.SecretBuildSource, out *v1.SecretBuildSource, s conversion.Scope) error {
	return autoConvert_build_SecretBuildSource_To_v1_SecretBuildSource(in, out, s)
}
174286
func Convert_build_BitbucketWebHookCause_To_v1_BitbucketWebHookCause(in *build.BitbucketWebHookCause, out *v1.BitbucketWebHookCause, s conversion.Scope) error {
	return autoConvert_build_BitbucketWebHookCause_To_v1_BitbucketWebHookCause(in, out, s)
}
511616
func (b *EtcdOptionsBuilder) BuildOptions(o interface{}) error {
	spec := o.(*kops.ClusterSpec)

	for _, c := range spec.EtcdClusters {
		if c.Provider == "" {
			if b.IsKubernetesGTE("1.12") {
				c.Provider = kops.EtcdProviderTypeManager
			} else if c.Manager != nil {
				c.Provider = kops.EtcdProviderTypeManager
			} else {
				c.Provider = kops.EtcdProviderTypeLegacy
			}
		}

		// Ensure the version is set
		if c.Version == "" && c.Provider == kops.EtcdProviderTypeLegacy {
			// Even if in legacy mode, etcd version 2 is unsupported as of k8s 1.13
			if b.IsKubernetesGTE("1.13") {
				c.Version = DefaultEtcd3Version_1_13
			} else {
				c.Version = DefaultEtcd2Version
			}
		}

		if c.Version == "" && c.Provider == kops.EtcdProviderTypeManager {
			// From 1.11, we run the k8s-recommended versions of etcd when using the manager
			if b.IsKubernetesGTE("1.11") {
				c.Version = DefaultEtcd3Version_1_11
			} else {
				c.Version = DefaultEtcd2Version
			}
		}

		// From 1.12, we enable TLS if we're running EtcdManager & etcd3
		//
		// (Moving to etcd3 is a disruptive upgrade, so we
		// force TLS at the same time as we enable
		// etcd-manager by default).
		if c.Provider == kops.EtcdProviderTypeManager {
			etcdV3 := true
			version := c.Version
			version = strings.TrimPrefix(version, "v")
			if strings.HasPrefix(version, "2.") {
				etcdV3 = false
			} else if strings.HasPrefix(version, "3.") {
				etcdV3 = true
			} else {
				return fmt.Errorf("unexpected etcd version %q", c.Version)
			}

			if b.IsKubernetesGTE("1.12.0") && etcdV3 {
				c.EnableEtcdTLS = true
				c.EnableTLSAuth = true
			}
		}
	}

	// Remap the well known images
	for _, c := range spec.EtcdClusters {

		// We remap the etcd manager image when we build the manifest,
		// but we need to map the standalone images here because protokube launches them

		if c.Provider == kops.EtcdProviderTypeLegacy {

			// remap etcd image
			{
				image := c.Image
				if image == "" {
					image = fmt.Sprintf("k8s.gcr.io/etcd:%s", c.Version)
				}

				if image != "" {
					image, err := b.AssetBuilder.RemapImage(image)
					if err != nil {
						return fmt.Errorf("unable to remap container %q: %v", image, err)
					}
					c.Image = image
				}
			}

			// remap backup manager image
			if c.Backups != nil {
				image := c.Backups.Image
				if image == "" {
					image = fmt.Sprintf(DefaultBackupImage)
				}

				if image != "" {
					image, err := b.AssetBuilder.RemapImage(image)
					if err != nil {
						return fmt.Errorf("unable to remap container %q: %v", image, err)
					}
					c.Backups.Image = image
				}
			}
		}
	}

	return nil
}
937093
func (r *RequestGetattrV2) MarshalBinary() ([]byte, error) {
	return MarshalBinary(&r.Request, &r.AttrHint, &r.Handle, &r.FileName)
}
1089870
func Convert_build_BuildConfig_To_v1_BuildConfig(in *build.BuildConfig, out *v1.BuildConfig, s conversion.Scope) error {
	return autoConvert_build_BuildConfig_To_v1_BuildConfig(in, out, s)
}
263175
func Convert_build_BuildConfigSpec_To_v1_BuildConfigSpec(in *build.BuildConfigSpec, out *v1.BuildConfigSpec, s conversion.Scope) error {
	return autoConvert_build_BuildConfigSpec_To_v1_BuildConfigSpec(in, out, s)
}
638920
func Convert_v1_BuildConfigStatus_To_build_BuildConfigStatus(in *v1.BuildConfigStatus, out *build.BuildConfigStatus, s conversion.Scope) error {
	return autoConvert_v1_BuildConfigStatus_To_build_BuildConfigStatus(in, out, s)
}
733166
func MarshalBuild(b chronograf.BuildInfo) ([]byte, error) {
	return proto.Marshal(&BuildInfo{
		Version: b.Version,
		Commit:  b.Commit,
	})
}
268806
func Convert_v1_BuildStatusOutputTo_To_build_BuildStatusOutputTo(in *v1.BuildStatusOutputTo, out *build.BuildStatusOutputTo, s conversion.Scope) error {
	return autoConvert_v1_BuildStatusOutputTo_To_build_BuildStatusOutputTo(in, out, s)
}
69675
func Convert_build_BuildRequest_To_v1_BuildRequest(in *build.BuildRequest, out *v1.BuildRequest, s conversion.Scope) error {
	return autoConvert_build_BuildRequest_To_v1_BuildRequest(in, out, s)
}
909144
func Convert_build_BuildSpec_To_v1_BuildSpec(in *build.BuildSpec, out *v1.BuildSpec, s conversion.Scope) error {
	return autoConvert_build_BuildSpec_To_v1_BuildSpec(in, out, s)
}