text:
package server

import (
	"context"
	"github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
	emptypb "github.com/GoogleCloudPlatform/declarative-resource-client-library/python/proto/empty_go_proto"
	alphapb "github.com/GoogleCloudPlatform/declarative-resource-client-library/python/proto/osconfig/alpha/osconfig_alpha_go_proto"
	"github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/osconfig/alpha"
)

// GuestPolicyServer implements the gRPC interface for GuestPolicy.
type GuestPolicyServer struct{}

// ProtoToGuestPolicyPackagesDesiredStateEnum converts a GuestPolicyPackagesDesiredStateEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackagesDesiredStateEnum(e alphapb.OsconfigAlphaGuestPolicyPackagesDesiredStateEnum) *alpha.GuestPolicyPackagesDesiredStateEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyPackagesDesiredStateEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyPackagesDesiredStateEnum(n[len("OsconfigAlphaGuestPolicyPackagesDesiredStateEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyPackagesManagerEnum converts a GuestPolicyPackagesManagerEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackagesManagerEnum(e alphapb.OsconfigAlphaGuestPolicyPackagesManagerEnum) *alpha.GuestPolicyPackagesManagerEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyPackagesManagerEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyPackagesManagerEnum(n[len("OsconfigAlphaGuestPolicyPackagesManagerEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyPackageRepositoriesAptArchiveTypeEnum converts a GuestPolicyPackageRepositoriesAptArchiveTypeEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum(e alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum) *alpha.GuestPolicyPackageRepositoriesAptArchiveTypeEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyPackageRepositoriesAptArchiveTypeEnum(n[len("OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum converts a GuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum(e alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum) *alpha.GuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum(n[len("OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum converts a GuestPolicyRecipesInstallStepsScriptRunInterpreterEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum(e alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum) *alpha.GuestPolicyRecipesInstallStepsScriptRunInterpreterEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyRecipesInstallStepsScriptRunInterpreterEnum(n[len("OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum converts a GuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum(e alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum) *alpha.GuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum(n[len("OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum converts a GuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum(e alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum) *alpha.GuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum(n[len("OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyRecipesDesiredStateEnum converts a GuestPolicyRecipesDesiredStateEnum enum from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesDesiredStateEnum(e alphapb.OsconfigAlphaGuestPolicyRecipesDesiredStateEnum) *alpha.GuestPolicyRecipesDesiredStateEnum {
	if e == 0 {
		return nil
	}
	if n, ok := alphapb.OsconfigAlphaGuestPolicyRecipesDesiredStateEnum_name[int32(e)]; ok {
		e := alpha.GuestPolicyRecipesDesiredStateEnum(n[len("OsconfigAlphaGuestPolicyRecipesDesiredStateEnum"):])
		return &e
	}
	return nil
}

// ProtoToGuestPolicyAssignment converts a GuestPolicyAssignment object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyAssignment(p *alphapb.OsconfigAlphaGuestPolicyAssignment) *alpha.GuestPolicyAssignment {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyAssignment{}
	for _, r := range p.GetGroupLabels() {
		obj.GroupLabels = append(obj.GroupLabels, *ProtoToOsconfigAlphaGuestPolicyAssignmentGroupLabels(r))
	}
	for _, r := range p.GetZones() {
		obj.Zones = append(obj.Zones, r)
	}
	for _, r := range p.GetInstances() {
		obj.Instances = append(obj.Instances, r)
	}
	for _, r := range p.GetInstanceNamePrefixes() {
		obj.InstanceNamePrefixes = append(obj.InstanceNamePrefixes, r)
	}
	for _, r := range p.GetOsTypes() {
		obj.OSTypes = append(obj.OSTypes, *ProtoToOsconfigAlphaGuestPolicyAssignmentOSTypes(r))
	}
	return obj
}

// ProtoToGuestPolicyAssignmentGroupLabels converts a GuestPolicyAssignmentGroupLabels object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyAssignmentGroupLabels(p *alphapb.OsconfigAlphaGuestPolicyAssignmentGroupLabels) *alpha.GuestPolicyAssignmentGroupLabels {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyAssignmentGroupLabels{}
	return obj
}

// ProtoToGuestPolicyAssignmentOSTypes converts a GuestPolicyAssignmentOSTypes object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyAssignmentOSTypes(p *alphapb.OsconfigAlphaGuestPolicyAssignmentOSTypes) *alpha.GuestPolicyAssignmentOSTypes {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyAssignmentOSTypes{
		OSShortName:    dcl.StringOrNil(p.GetOsShortName()),
		OSVersion:      dcl.StringOrNil(p.GetOsVersion()),
		OSArchitecture: dcl.StringOrNil(p.GetOsArchitecture()),
	}
	return obj
}

// ProtoToGuestPolicyPackages converts a GuestPolicyPackages object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackages(p *alphapb.OsconfigAlphaGuestPolicyPackages) *alpha.GuestPolicyPackages {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyPackages{
		Name:         dcl.StringOrNil(p.GetName()),
		DesiredState: ProtoToOsconfigAlphaGuestPolicyPackagesDesiredStateEnum(p.GetDesiredState()),
		Manager:      ProtoToOsconfigAlphaGuestPolicyPackagesManagerEnum(p.GetManager()),
	}
	return obj
}

// ProtoToGuestPolicyPackageRepositories converts a GuestPolicyPackageRepositories object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackageRepositories(p *alphapb.OsconfigAlphaGuestPolicyPackageRepositories) *alpha.GuestPolicyPackageRepositories {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyPackageRepositories{
		Apt:    ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesApt(p.GetApt()),
		Yum:    ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesYum(p.GetYum()),
		Zypper: ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesZypper(p.GetZypper()),
		Goo:    ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesGoo(p.GetGoo()),
	}
	return obj
}

// ProtoToGuestPolicyPackageRepositoriesApt converts a GuestPolicyPackageRepositoriesApt object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesApt(p *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesApt) *alpha.GuestPolicyPackageRepositoriesApt {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyPackageRepositoriesApt{
		ArchiveType:  ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum(p.GetArchiveType()),
		Uri:          dcl.StringOrNil(p.GetUri()),
		Distribution: dcl.StringOrNil(p.GetDistribution()),
		GpgKey:       dcl.StringOrNil(p.GetGpgKey()),
	}
	for _, r := range p.GetComponents() {
		obj.Components = append(obj.Components, r)
	}
	return obj
}

// ProtoToGuestPolicyPackageRepositoriesYum converts a GuestPolicyPackageRepositoriesYum object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesYum(p *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesYum) *alpha.GuestPolicyPackageRepositoriesYum {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyPackageRepositoriesYum{
		Id:          dcl.StringOrNil(p.GetId()),
		DisplayName: dcl.StringOrNil(p.GetDisplayName()),
		BaseUrl:     dcl.StringOrNil(p.GetBaseUrl()),
	}
	for _, r := range p.GetGpgKeys() {
		obj.GpgKeys = append(obj.GpgKeys, r)
	}
	return obj
}

// ProtoToGuestPolicyPackageRepositoriesZypper converts a GuestPolicyPackageRepositoriesZypper object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesZypper(p *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesZypper) *alpha.GuestPolicyPackageRepositoriesZypper {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyPackageRepositoriesZypper{
		Id:          dcl.StringOrNil(p.GetId()),
		DisplayName: dcl.StringOrNil(p.GetDisplayName()),
		BaseUrl:     dcl.StringOrNil(p.GetBaseUrl()),
	}
	for _, r := range p.GetGpgKeys() {
		obj.GpgKeys = append(obj.GpgKeys, r)
	}
	return obj
}

// ProtoToGuestPolicyPackageRepositoriesGoo converts a GuestPolicyPackageRepositoriesGoo object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyPackageRepositoriesGoo(p *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesGoo) *alpha.GuestPolicyPackageRepositoriesGoo {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyPackageRepositoriesGoo{
		Name: dcl.StringOrNil(p.GetName()),
		Url:  dcl.StringOrNil(p.GetUrl()),
	}
	return obj
}

// ProtoToGuestPolicyRecipes converts a GuestPolicyRecipes object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipes(p *alphapb.OsconfigAlphaGuestPolicyRecipes) *alpha.GuestPolicyRecipes {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipes{
		Name:         dcl.StringOrNil(p.GetName()),
		Version:      dcl.StringOrNil(p.GetVersion()),
		DesiredState: ProtoToOsconfigAlphaGuestPolicyRecipesDesiredStateEnum(p.GetDesiredState()),
	}
	for _, r := range p.GetArtifacts() {
		obj.Artifacts = append(obj.Artifacts, *ProtoToOsconfigAlphaGuestPolicyRecipesArtifacts(r))
	}
	for _, r := range p.GetInstallSteps() {
		obj.InstallSteps = append(obj.InstallSteps, *ProtoToOsconfigAlphaGuestPolicyRecipesInstallSteps(r))
	}
	for _, r := range p.GetUpdateSteps() {
		obj.UpdateSteps = append(obj.UpdateSteps, *ProtoToOsconfigAlphaGuestPolicyRecipesUpdateSteps(r))
	}
	return obj
}

// ProtoToGuestPolicyRecipesArtifacts converts a GuestPolicyRecipesArtifacts object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesArtifacts(p *alphapb.OsconfigAlphaGuestPolicyRecipesArtifacts) *alpha.GuestPolicyRecipesArtifacts {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesArtifacts{
		Id:            dcl.StringOrNil(p.GetId()),
		Remote:        ProtoToOsconfigAlphaGuestPolicyRecipesArtifactsRemote(p.GetRemote()),
		Gcs:           ProtoToOsconfigAlphaGuestPolicyRecipesArtifactsGcs(p.GetGcs()),
		AllowInsecure: dcl.Bool(p.GetAllowInsecure()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesArtifactsRemote converts a GuestPolicyRecipesArtifactsRemote object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesArtifactsRemote(p *alphapb.OsconfigAlphaGuestPolicyRecipesArtifactsRemote) *alpha.GuestPolicyRecipesArtifactsRemote {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesArtifactsRemote{
		Uri:      dcl.StringOrNil(p.GetUri()),
		Checksum: dcl.StringOrNil(p.GetChecksum()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesArtifactsGcs converts a GuestPolicyRecipesArtifactsGcs object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesArtifactsGcs(p *alphapb.OsconfigAlphaGuestPolicyRecipesArtifactsGcs) *alpha.GuestPolicyRecipesArtifactsGcs {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesArtifactsGcs{
		Bucket:     dcl.StringOrNil(p.GetBucket()),
		Object:     dcl.StringOrNil(p.GetObject()),
		Generation: dcl.Int64OrNil(p.GetGeneration()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallSteps converts a GuestPolicyRecipesInstallSteps object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallSteps(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallSteps) *alpha.GuestPolicyRecipesInstallSteps {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallSteps{
		FileCopy:          ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsFileCopy(p.GetFileCopy()),
		ArchiveExtraction: ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtraction(p.GetArchiveExtraction()),
		MsiInstallation:   ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsMsiInstallation(p.GetMsiInstallation()),
		DpkgInstallation:  ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsDpkgInstallation(p.GetDpkgInstallation()),
		RpmInstallation:   ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsRpmInstallation(p.GetRpmInstallation()),
		FileExec:          ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsFileExec(p.GetFileExec()),
		ScriptRun:         ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsScriptRun(p.GetScriptRun()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallStepsFileCopy converts a GuestPolicyRecipesInstallStepsFileCopy object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsFileCopy(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsFileCopy) *alpha.GuestPolicyRecipesInstallStepsFileCopy {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallStepsFileCopy{
		ArtifactId:  dcl.StringOrNil(p.GetArtifactId()),
		Destination: dcl.StringOrNil(p.GetDestination()),
		Overwrite:   dcl.Bool(p.GetOverwrite()),
		Permissions: dcl.StringOrNil(p.GetPermissions()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallStepsArchiveExtraction converts a GuestPolicyRecipesInstallStepsArchiveExtraction object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtraction(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtraction) *alpha.GuestPolicyRecipesInstallStepsArchiveExtraction {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallStepsArchiveExtraction{
		ArtifactId:  dcl.StringOrNil(p.GetArtifactId()),
		Destination: dcl.StringOrNil(p.GetDestination()),
		Type:        ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum(p.GetType()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallStepsMsiInstallation converts a GuestPolicyRecipesInstallStepsMsiInstallation object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsMsiInstallation(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsMsiInstallation) *alpha.GuestPolicyRecipesInstallStepsMsiInstallation {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallStepsMsiInstallation{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
	}
	for _, r := range p.GetFlags() {
		obj.Flags = append(obj.Flags, r)
	}
	for _, r := range p.GetAllowedExitCodes() {
		obj.AllowedExitCodes = append(obj.AllowedExitCodes, r)
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallStepsDpkgInstallation converts a GuestPolicyRecipesInstallStepsDpkgInstallation object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsDpkgInstallation(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsDpkgInstallation) *alpha.GuestPolicyRecipesInstallStepsDpkgInstallation {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallStepsDpkgInstallation{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallStepsRpmInstallation converts a GuestPolicyRecipesInstallStepsRpmInstallation object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsRpmInstallation(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsRpmInstallation) *alpha.GuestPolicyRecipesInstallStepsRpmInstallation {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallStepsRpmInstallation{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallStepsFileExec converts a GuestPolicyRecipesInstallStepsFileExec object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsFileExec(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsFileExec) *alpha.GuestPolicyRecipesInstallStepsFileExec {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallStepsFileExec{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
		LocalPath:  dcl.StringOrNil(p.GetLocalPath()),
	}
	for _, r := range p.GetArgs() {
		obj.Args = append(obj.Args, r)
	}
	for _, r := range p.GetAllowedExitCodes() {
		obj.AllowedExitCodes = append(obj.AllowedExitCodes, r)
	}
	return obj
}

// ProtoToGuestPolicyRecipesInstallStepsScriptRun converts a GuestPolicyRecipesInstallStepsScriptRun object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsScriptRun(p *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRun) *alpha.GuestPolicyRecipesInstallStepsScriptRun {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesInstallStepsScriptRun{
		Script:      dcl.StringOrNil(p.GetScript()),
		Interpreter: ProtoToOsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum(p.GetInterpreter()),
	}
	for _, r := range p.GetAllowedExitCodes() {
		obj.AllowedExitCodes = append(obj.AllowedExitCodes, r)
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateSteps converts a GuestPolicyRecipesUpdateSteps object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateSteps(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateSteps) *alpha.GuestPolicyRecipesUpdateSteps {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateSteps{
		FileCopy:          ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsFileCopy(p.GetFileCopy()),
		ArchiveExtraction: ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtraction(p.GetArchiveExtraction()),
		MsiInstallation:   ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsMsiInstallation(p.GetMsiInstallation()),
		DpkgInstallation:  ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsDpkgInstallation(p.GetDpkgInstallation()),
		RpmInstallation:   ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsRpmInstallation(p.GetRpmInstallation()),
		FileExec:          ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsFileExec(p.GetFileExec()),
		ScriptRun:         ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRun(p.GetScriptRun()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateStepsFileCopy converts a GuestPolicyRecipesUpdateStepsFileCopy object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsFileCopy(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsFileCopy) *alpha.GuestPolicyRecipesUpdateStepsFileCopy {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateStepsFileCopy{
		ArtifactId:  dcl.StringOrNil(p.GetArtifactId()),
		Destination: dcl.StringOrNil(p.GetDestination()),
		Overwrite:   dcl.Bool(p.GetOverwrite()),
		Permissions: dcl.StringOrNil(p.GetPermissions()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateStepsArchiveExtraction converts a GuestPolicyRecipesUpdateStepsArchiveExtraction object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtraction(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtraction) *alpha.GuestPolicyRecipesUpdateStepsArchiveExtraction {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateStepsArchiveExtraction{
		ArtifactId:  dcl.StringOrNil(p.GetArtifactId()),
		Destination: dcl.StringOrNil(p.GetDestination()),
		Type:        ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum(p.GetType()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateStepsMsiInstallation converts a GuestPolicyRecipesUpdateStepsMsiInstallation object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsMsiInstallation(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsMsiInstallation) *alpha.GuestPolicyRecipesUpdateStepsMsiInstallation {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateStepsMsiInstallation{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
	}
	for _, r := range p.GetFlags() {
		obj.Flags = append(obj.Flags, r)
	}
	for _, r := range p.GetAllowedExitCodes() {
		obj.AllowedExitCodes = append(obj.AllowedExitCodes, r)
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateStepsDpkgInstallation converts a GuestPolicyRecipesUpdateStepsDpkgInstallation object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsDpkgInstallation(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsDpkgInstallation) *alpha.GuestPolicyRecipesUpdateStepsDpkgInstallation {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateStepsDpkgInstallation{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateStepsRpmInstallation converts a GuestPolicyRecipesUpdateStepsRpmInstallation object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsRpmInstallation(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsRpmInstallation) *alpha.GuestPolicyRecipesUpdateStepsRpmInstallation {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateStepsRpmInstallation{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateStepsFileExec converts a GuestPolicyRecipesUpdateStepsFileExec object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsFileExec(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsFileExec) *alpha.GuestPolicyRecipesUpdateStepsFileExec {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateStepsFileExec{
		ArtifactId: dcl.StringOrNil(p.GetArtifactId()),
		LocalPath:  dcl.StringOrNil(p.GetLocalPath()),
	}
	for _, r := range p.GetArgs() {
		obj.Args = append(obj.Args, r)
	}
	for _, r := range p.GetAllowedExitCodes() {
		obj.AllowedExitCodes = append(obj.AllowedExitCodes, r)
	}
	return obj
}

// ProtoToGuestPolicyRecipesUpdateStepsScriptRun converts a GuestPolicyRecipesUpdateStepsScriptRun object from its proto representation.
func ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRun(p *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRun) *alpha.GuestPolicyRecipesUpdateStepsScriptRun {
	if p == nil {
		return nil
	}
	obj := &alpha.GuestPolicyRecipesUpdateStepsScriptRun{
		Script:      dcl.StringOrNil(p.GetScript()),
		Interpreter: ProtoToOsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum(p.GetInterpreter()),
	}
	for _, r := range p.GetAllowedExitCodes() {
		obj.AllowedExitCodes = append(obj.AllowedExitCodes, r)
	}
	return obj
}

// ProtoToGuestPolicy converts a GuestPolicy resource from its proto representation.
func ProtoToGuestPolicy(p *alphapb.OsconfigAlphaGuestPolicy) *alpha.GuestPolicy {
	obj := &alpha.GuestPolicy{
		Name:        dcl.StringOrNil(p.GetName()),
		Description: dcl.StringOrNil(p.GetDescription()),
		CreateTime:  dcl.StringOrNil(p.GetCreateTime()),
		UpdateTime:  dcl.StringOrNil(p.GetUpdateTime()),
		Assignment:  ProtoToOsconfigAlphaGuestPolicyAssignment(p.GetAssignment()),
		Etag:        dcl.StringOrNil(p.GetEtag()),
		Project:     dcl.StringOrNil(p.GetProject()),
	}
	for _, r := range p.GetPackages() {
		obj.Packages = append(obj.Packages, *ProtoToOsconfigAlphaGuestPolicyPackages(r))
	}
	for _, r := range p.GetPackageRepositories() {
		obj.PackageRepositories = append(obj.PackageRepositories, *ProtoToOsconfigAlphaGuestPolicyPackageRepositories(r))
	}
	for _, r := range p.GetRecipes() {
		obj.Recipes = append(obj.Recipes, *ProtoToOsconfigAlphaGuestPolicyRecipes(r))
	}
	return obj
}

// GuestPolicyPackagesDesiredStateEnumToProto converts a GuestPolicyPackagesDesiredStateEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyPackagesDesiredStateEnumToProto(e *alpha.GuestPolicyPackagesDesiredStateEnum) alphapb.OsconfigAlphaGuestPolicyPackagesDesiredStateEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyPackagesDesiredStateEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyPackagesDesiredStateEnum_value["GuestPolicyPackagesDesiredStateEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyPackagesDesiredStateEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyPackagesDesiredStateEnum(0)
}

// GuestPolicyPackagesManagerEnumToProto converts a GuestPolicyPackagesManagerEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyPackagesManagerEnumToProto(e *alpha.GuestPolicyPackagesManagerEnum) alphapb.OsconfigAlphaGuestPolicyPackagesManagerEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyPackagesManagerEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyPackagesManagerEnum_value["GuestPolicyPackagesManagerEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyPackagesManagerEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyPackagesManagerEnum(0)
}

// GuestPolicyPackageRepositoriesAptArchiveTypeEnumToProto converts a GuestPolicyPackageRepositoriesAptArchiveTypeEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnumToProto(e *alpha.GuestPolicyPackageRepositoriesAptArchiveTypeEnum) alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum_value["GuestPolicyPackageRepositoriesAptArchiveTypeEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnum(0)
}

// GuestPolicyRecipesInstallStepsArchiveExtractionTypeEnumToProto converts a GuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnumToProto(e *alpha.GuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum) alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum_value["GuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnum(0)
}

// GuestPolicyRecipesInstallStepsScriptRunInterpreterEnumToProto converts a GuestPolicyRecipesInstallStepsScriptRunInterpreterEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnumToProto(e *alpha.GuestPolicyRecipesInstallStepsScriptRunInterpreterEnum) alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum_value["GuestPolicyRecipesInstallStepsScriptRunInterpreterEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnum(0)
}

// GuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnumToProto converts a GuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnumToProto(e *alpha.GuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum) alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum_value["GuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnum(0)
}

// GuestPolicyRecipesUpdateStepsScriptRunInterpreterEnumToProto converts a GuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnumToProto(e *alpha.GuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum) alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum_value["GuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnum(0)
}

// GuestPolicyRecipesDesiredStateEnumToProto converts a GuestPolicyRecipesDesiredStateEnum enum to its proto representation.
func OsconfigAlphaGuestPolicyRecipesDesiredStateEnumToProto(e *alpha.GuestPolicyRecipesDesiredStateEnum) alphapb.OsconfigAlphaGuestPolicyRecipesDesiredStateEnum {
	if e == nil {
		return alphapb.OsconfigAlphaGuestPolicyRecipesDesiredStateEnum(0)
	}
	if v, ok := alphapb.OsconfigAlphaGuestPolicyRecipesDesiredStateEnum_value["GuestPolicyRecipesDesiredStateEnum"+string(*e)]; ok {
		return alphapb.OsconfigAlphaGuestPolicyRecipesDesiredStateEnum(v)
	}
	return alphapb.OsconfigAlphaGuestPolicyRecipesDesiredStateEnum(0)
}

// GuestPolicyAssignmentToProto converts a GuestPolicyAssignment object to its proto representation.
func OsconfigAlphaGuestPolicyAssignmentToProto(o *alpha.GuestPolicyAssignment) *alphapb.OsconfigAlphaGuestPolicyAssignment {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyAssignment{}
	sGroupLabels := make([]*alphapb.OsconfigAlphaGuestPolicyAssignmentGroupLabels, len(o.GroupLabels))
	for i, r := range o.GroupLabels {
		sGroupLabels[i] = OsconfigAlphaGuestPolicyAssignmentGroupLabelsToProto(&r)
	}
	p.SetGroupLabels(sGroupLabels)
	sZones := make([]string, len(o.Zones))
	for i, r := range o.Zones {
		sZones[i] = r
	}
	p.SetZones(sZones)
	sInstances := make([]string, len(o.Instances))
	for i, r := range o.Instances {
		sInstances[i] = r
	}
	p.SetInstances(sInstances)
	sInstanceNamePrefixes := make([]string, len(o.InstanceNamePrefixes))
	for i, r := range o.InstanceNamePrefixes {
		sInstanceNamePrefixes[i] = r
	}
	p.SetInstanceNamePrefixes(sInstanceNamePrefixes)
	sOSTypes := make([]*alphapb.OsconfigAlphaGuestPolicyAssignmentOSTypes, len(o.OSTypes))
	for i, r := range o.OSTypes {
		sOSTypes[i] = OsconfigAlphaGuestPolicyAssignmentOSTypesToProto(&r)
	}
	p.SetOsTypes(sOSTypes)
	return p
}

// GuestPolicyAssignmentGroupLabelsToProto converts a GuestPolicyAssignmentGroupLabels object to its proto representation.
func OsconfigAlphaGuestPolicyAssignmentGroupLabelsToProto(o *alpha.GuestPolicyAssignmentGroupLabels) *alphapb.OsconfigAlphaGuestPolicyAssignmentGroupLabels {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyAssignmentGroupLabels{}
	mLabels := make(map[string]string, len(o.Labels))
	for k, r := range o.Labels {
		mLabels[k] = r
	}
	p.SetLabels(mLabels)
	return p
}

// GuestPolicyAssignmentOSTypesToProto converts a GuestPolicyAssignmentOSTypes object to its proto representation.
func OsconfigAlphaGuestPolicyAssignmentOSTypesToProto(o *alpha.GuestPolicyAssignmentOSTypes) *alphapb.OsconfigAlphaGuestPolicyAssignmentOSTypes {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyAssignmentOSTypes{}
	p.SetOsShortName(dcl.ValueOrEmptyString(o.OSShortName))
	p.SetOsVersion(dcl.ValueOrEmptyString(o.OSVersion))
	p.SetOsArchitecture(dcl.ValueOrEmptyString(o.OSArchitecture))
	return p
}

// GuestPolicyPackagesToProto converts a GuestPolicyPackages object to its proto representation.
func OsconfigAlphaGuestPolicyPackagesToProto(o *alpha.GuestPolicyPackages) *alphapb.OsconfigAlphaGuestPolicyPackages {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyPackages{}
	p.SetName(dcl.ValueOrEmptyString(o.Name))
	p.SetDesiredState(OsconfigAlphaGuestPolicyPackagesDesiredStateEnumToProto(o.DesiredState))
	p.SetManager(OsconfigAlphaGuestPolicyPackagesManagerEnumToProto(o.Manager))
	return p
}

// GuestPolicyPackageRepositoriesToProto converts a GuestPolicyPackageRepositories object to its proto representation.
func OsconfigAlphaGuestPolicyPackageRepositoriesToProto(o *alpha.GuestPolicyPackageRepositories) *alphapb.OsconfigAlphaGuestPolicyPackageRepositories {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyPackageRepositories{}
	p.SetApt(OsconfigAlphaGuestPolicyPackageRepositoriesAptToProto(o.Apt))
	p.SetYum(OsconfigAlphaGuestPolicyPackageRepositoriesYumToProto(o.Yum))
	p.SetZypper(OsconfigAlphaGuestPolicyPackageRepositoriesZypperToProto(o.Zypper))
	p.SetGoo(OsconfigAlphaGuestPolicyPackageRepositoriesGooToProto(o.Goo))
	return p
}

// GuestPolicyPackageRepositoriesAptToProto converts a GuestPolicyPackageRepositoriesApt object to its proto representation.
func OsconfigAlphaGuestPolicyPackageRepositoriesAptToProto(o *alpha.GuestPolicyPackageRepositoriesApt) *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesApt {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesApt{}
	p.SetArchiveType(OsconfigAlphaGuestPolicyPackageRepositoriesAptArchiveTypeEnumToProto(o.ArchiveType))
	p.SetUri(dcl.ValueOrEmptyString(o.Uri))
	p.SetDistribution(dcl.ValueOrEmptyString(o.Distribution))
	p.SetGpgKey(dcl.ValueOrEmptyString(o.GpgKey))
	sComponents := make([]string, len(o.Components))
	for i, r := range o.Components {
		sComponents[i] = r
	}
	p.SetComponents(sComponents)
	return p
}

// GuestPolicyPackageRepositoriesYumToProto converts a GuestPolicyPackageRepositoriesYum object to its proto representation.
func OsconfigAlphaGuestPolicyPackageRepositoriesYumToProto(o *alpha.GuestPolicyPackageRepositoriesYum) *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesYum {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesYum{}
	p.SetId(dcl.ValueOrEmptyString(o.Id))
	p.SetDisplayName(dcl.ValueOrEmptyString(o.DisplayName))
	p.SetBaseUrl(dcl.ValueOrEmptyString(o.BaseUrl))
	sGpgKeys := make([]string, len(o.GpgKeys))
	for i, r := range o.GpgKeys {
		sGpgKeys[i] = r
	}
	p.SetGpgKeys(sGpgKeys)
	return p
}

// GuestPolicyPackageRepositoriesZypperToProto converts a GuestPolicyPackageRepositoriesZypper object to its proto representation.
func OsconfigAlphaGuestPolicyPackageRepositoriesZypperToProto(o *alpha.GuestPolicyPackageRepositoriesZypper) *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesZypper {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesZypper{}
	p.SetId(dcl.ValueOrEmptyString(o.Id))
	p.SetDisplayName(dcl.ValueOrEmptyString(o.DisplayName))
	p.SetBaseUrl(dcl.ValueOrEmptyString(o.BaseUrl))
	sGpgKeys := make([]string, len(o.GpgKeys))
	for i, r := range o.GpgKeys {
		sGpgKeys[i] = r
	}
	p.SetGpgKeys(sGpgKeys)
	return p
}

// GuestPolicyPackageRepositoriesGooToProto converts a GuestPolicyPackageRepositoriesGoo object to its proto representation.
func OsconfigAlphaGuestPolicyPackageRepositoriesGooToProto(o *alpha.GuestPolicyPackageRepositoriesGoo) *alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesGoo {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyPackageRepositoriesGoo{}
	p.SetName(dcl.ValueOrEmptyString(o.Name))
	p.SetUrl(dcl.ValueOrEmptyString(o.Url))
	return p
}

// GuestPolicyRecipesToProto converts a GuestPolicyRecipes object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesToProto(o *alpha.GuestPolicyRecipes) *alphapb.OsconfigAlphaGuestPolicyRecipes {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipes{}
	p.SetName(dcl.ValueOrEmptyString(o.Name))
	p.SetVersion(dcl.ValueOrEmptyString(o.Version))
	p.SetDesiredState(OsconfigAlphaGuestPolicyRecipesDesiredStateEnumToProto(o.DesiredState))
	sArtifacts := make([]*alphapb.OsconfigAlphaGuestPolicyRecipesArtifacts, len(o.Artifacts))
	for i, r := range o.Artifacts {
		sArtifacts[i] = OsconfigAlphaGuestPolicyRecipesArtifactsToProto(&r)
	}
	p.SetArtifacts(sArtifacts)
	sInstallSteps := make([]*alphapb.OsconfigAlphaGuestPolicyRecipesInstallSteps, len(o.InstallSteps))
	for i, r := range o.InstallSteps {
		sInstallSteps[i] = OsconfigAlphaGuestPolicyRecipesInstallStepsToProto(&r)
	}
	p.SetInstallSteps(sInstallSteps)
	sUpdateSteps := make([]*alphapb.OsconfigAlphaGuestPolicyRecipesUpdateSteps, len(o.UpdateSteps))
	for i, r := range o.UpdateSteps {
		sUpdateSteps[i] = OsconfigAlphaGuestPolicyRecipesUpdateStepsToProto(&r)
	}
	p.SetUpdateSteps(sUpdateSteps)
	return p
}

// GuestPolicyRecipesArtifactsToProto converts a GuestPolicyRecipesArtifacts object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesArtifactsToProto(o *alpha.GuestPolicyRecipesArtifacts) *alphapb.OsconfigAlphaGuestPolicyRecipesArtifacts {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesArtifacts{}
	p.SetId(dcl.ValueOrEmptyString(o.Id))
	p.SetRemote(OsconfigAlphaGuestPolicyRecipesArtifactsRemoteToProto(o.Remote))
	p.SetGcs(OsconfigAlphaGuestPolicyRecipesArtifactsGcsToProto(o.Gcs))
	p.SetAllowInsecure(dcl.ValueOrEmptyBool(o.AllowInsecure))
	return p
}

// GuestPolicyRecipesArtifactsRemoteToProto converts a GuestPolicyRecipesArtifactsRemote object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesArtifactsRemoteToProto(o *alpha.GuestPolicyRecipesArtifactsRemote) *alphapb.OsconfigAlphaGuestPolicyRecipesArtifactsRemote {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesArtifactsRemote{}
	p.SetUri(dcl.ValueOrEmptyString(o.Uri))
	p.SetChecksum(dcl.ValueOrEmptyString(o.Checksum))
	return p
}

// GuestPolicyRecipesArtifactsGcsToProto converts a GuestPolicyRecipesArtifactsGcs object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesArtifactsGcsToProto(o *alpha.GuestPolicyRecipesArtifactsGcs) *alphapb.OsconfigAlphaGuestPolicyRecipesArtifactsGcs {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesArtifactsGcs{}
	p.SetBucket(dcl.ValueOrEmptyString(o.Bucket))
	p.SetObject(dcl.ValueOrEmptyString(o.Object))
	p.SetGeneration(dcl.ValueOrEmptyInt64(o.Generation))
	return p
}

// GuestPolicyRecipesInstallStepsToProto converts a GuestPolicyRecipesInstallSteps object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsToProto(o *alpha.GuestPolicyRecipesInstallSteps) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallSteps {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallSteps{}
	p.SetFileCopy(OsconfigAlphaGuestPolicyRecipesInstallStepsFileCopyToProto(o.FileCopy))
	p.SetArchiveExtraction(OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionToProto(o.ArchiveExtraction))
	p.SetMsiInstallation(OsconfigAlphaGuestPolicyRecipesInstallStepsMsiInstallationToProto(o.MsiInstallation))
	p.SetDpkgInstallation(OsconfigAlphaGuestPolicyRecipesInstallStepsDpkgInstallationToProto(o.DpkgInstallation))
	p.SetRpmInstallation(OsconfigAlphaGuestPolicyRecipesInstallStepsRpmInstallationToProto(o.RpmInstallation))
	p.SetFileExec(OsconfigAlphaGuestPolicyRecipesInstallStepsFileExecToProto(o.FileExec))
	p.SetScriptRun(OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunToProto(o.ScriptRun))
	return p
}

// GuestPolicyRecipesInstallStepsFileCopyToProto converts a GuestPolicyRecipesInstallStepsFileCopy object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsFileCopyToProto(o *alpha.GuestPolicyRecipesInstallStepsFileCopy) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsFileCopy {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsFileCopy{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	p.SetDestination(dcl.ValueOrEmptyString(o.Destination))
	p.SetOverwrite(dcl.ValueOrEmptyBool(o.Overwrite))
	p.SetPermissions(dcl.ValueOrEmptyString(o.Permissions))
	return p
}

// GuestPolicyRecipesInstallStepsArchiveExtractionToProto converts a GuestPolicyRecipesInstallStepsArchiveExtraction object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionToProto(o *alpha.GuestPolicyRecipesInstallStepsArchiveExtraction) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtraction {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtraction{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	p.SetDestination(dcl.ValueOrEmptyString(o.Destination))
	p.SetType(OsconfigAlphaGuestPolicyRecipesInstallStepsArchiveExtractionTypeEnumToProto(o.Type))
	return p
}

// GuestPolicyRecipesInstallStepsMsiInstallationToProto converts a GuestPolicyRecipesInstallStepsMsiInstallation object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsMsiInstallationToProto(o *alpha.GuestPolicyRecipesInstallStepsMsiInstallation) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsMsiInstallation {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsMsiInstallation{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	sFlags := make([]string, len(o.Flags))
	for i, r := range o.Flags {
		sFlags[i] = r
	}
	p.SetFlags(sFlags)
	sAllowedExitCodes := make([]int64, len(o.AllowedExitCodes))
	for i, r := range o.AllowedExitCodes {
		sAllowedExitCodes[i] = r
	}
	p.SetAllowedExitCodes(sAllowedExitCodes)
	return p
}

// GuestPolicyRecipesInstallStepsDpkgInstallationToProto converts a GuestPolicyRecipesInstallStepsDpkgInstallation object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsDpkgInstallationToProto(o *alpha.GuestPolicyRecipesInstallStepsDpkgInstallation) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsDpkgInstallation {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsDpkgInstallation{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	return p
}

// GuestPolicyRecipesInstallStepsRpmInstallationToProto converts a GuestPolicyRecipesInstallStepsRpmInstallation object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsRpmInstallationToProto(o *alpha.GuestPolicyRecipesInstallStepsRpmInstallation) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsRpmInstallation {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsRpmInstallation{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	return p
}

// GuestPolicyRecipesInstallStepsFileExecToProto converts a GuestPolicyRecipesInstallStepsFileExec object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsFileExecToProto(o *alpha.GuestPolicyRecipesInstallStepsFileExec) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsFileExec {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsFileExec{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	p.SetLocalPath(dcl.ValueOrEmptyString(o.LocalPath))
	sArgs := make([]string, len(o.Args))
	for i, r := range o.Args {
		sArgs[i] = r
	}
	p.SetArgs(sArgs)
	sAllowedExitCodes := make([]int64, len(o.AllowedExitCodes))
	for i, r := range o.AllowedExitCodes {
		sAllowedExitCodes[i] = r
	}
	p.SetAllowedExitCodes(sAllowedExitCodes)
	return p
}

// GuestPolicyRecipesInstallStepsScriptRunToProto converts a GuestPolicyRecipesInstallStepsScriptRun object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunToProto(o *alpha.GuestPolicyRecipesInstallStepsScriptRun) *alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRun {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRun{}
	p.SetScript(dcl.ValueOrEmptyString(o.Script))
	p.SetInterpreter(OsconfigAlphaGuestPolicyRecipesInstallStepsScriptRunInterpreterEnumToProto(o.Interpreter))
	sAllowedExitCodes := make([]int64, len(o.AllowedExitCodes))
	for i, r := range o.AllowedExitCodes {
		sAllowedExitCodes[i] = r
	}
	p.SetAllowedExitCodes(sAllowedExitCodes)
	return p
}

// GuestPolicyRecipesUpdateStepsToProto converts a GuestPolicyRecipesUpdateSteps object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsToProto(o *alpha.GuestPolicyRecipesUpdateSteps) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateSteps {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateSteps{}
	p.SetFileCopy(OsconfigAlphaGuestPolicyRecipesUpdateStepsFileCopyToProto(o.FileCopy))
	p.SetArchiveExtraction(OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionToProto(o.ArchiveExtraction))
	p.SetMsiInstallation(OsconfigAlphaGuestPolicyRecipesUpdateStepsMsiInstallationToProto(o.MsiInstallation))
	p.SetDpkgInstallation(OsconfigAlphaGuestPolicyRecipesUpdateStepsDpkgInstallationToProto(o.DpkgInstallation))
	p.SetRpmInstallation(OsconfigAlphaGuestPolicyRecipesUpdateStepsRpmInstallationToProto(o.RpmInstallation))
	p.SetFileExec(OsconfigAlphaGuestPolicyRecipesUpdateStepsFileExecToProto(o.FileExec))
	p.SetScriptRun(OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunToProto(o.ScriptRun))
	return p
}

// GuestPolicyRecipesUpdateStepsFileCopyToProto converts a GuestPolicyRecipesUpdateStepsFileCopy object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsFileCopyToProto(o *alpha.GuestPolicyRecipesUpdateStepsFileCopy) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsFileCopy {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsFileCopy{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	p.SetDestination(dcl.ValueOrEmptyString(o.Destination))
	p.SetOverwrite(dcl.ValueOrEmptyBool(o.Overwrite))
	p.SetPermissions(dcl.ValueOrEmptyString(o.Permissions))
	return p
}

// GuestPolicyRecipesUpdateStepsArchiveExtractionToProto converts a GuestPolicyRecipesUpdateStepsArchiveExtraction object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionToProto(o *alpha.GuestPolicyRecipesUpdateStepsArchiveExtraction) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtraction {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtraction{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	p.SetDestination(dcl.ValueOrEmptyString(o.Destination))
	p.SetType(OsconfigAlphaGuestPolicyRecipesUpdateStepsArchiveExtractionTypeEnumToProto(o.Type))
	return p
}

// GuestPolicyRecipesUpdateStepsMsiInstallationToProto converts a GuestPolicyRecipesUpdateStepsMsiInstallation object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsMsiInstallationToProto(o *alpha.GuestPolicyRecipesUpdateStepsMsiInstallation) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsMsiInstallation {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsMsiInstallation{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	sFlags := make([]string, len(o.Flags))
	for i, r := range o.Flags {
		sFlags[i] = r
	}
	p.SetFlags(sFlags)
	sAllowedExitCodes := make([]int64, len(o.AllowedExitCodes))
	for i, r := range o.AllowedExitCodes {
		sAllowedExitCodes[i] = r
	}
	p.SetAllowedExitCodes(sAllowedExitCodes)
	return p
}

// GuestPolicyRecipesUpdateStepsDpkgInstallationToProto converts a GuestPolicyRecipesUpdateStepsDpkgInstallation object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsDpkgInstallationToProto(o *alpha.GuestPolicyRecipesUpdateStepsDpkgInstallation) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsDpkgInstallation {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsDpkgInstallation{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	return p
}

// GuestPolicyRecipesUpdateStepsRpmInstallationToProto converts a GuestPolicyRecipesUpdateStepsRpmInstallation object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsRpmInstallationToProto(o *alpha.GuestPolicyRecipesUpdateStepsRpmInstallation) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsRpmInstallation {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsRpmInstallation{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	return p
}

// GuestPolicyRecipesUpdateStepsFileExecToProto converts a GuestPolicyRecipesUpdateStepsFileExec object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsFileExecToProto(o *alpha.GuestPolicyRecipesUpdateStepsFileExec) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsFileExec {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsFileExec{}
	p.SetArtifactId(dcl.ValueOrEmptyString(o.ArtifactId))
	p.SetLocalPath(dcl.ValueOrEmptyString(o.LocalPath))
	sArgs := make([]string, len(o.Args))
	for i, r := range o.Args {
		sArgs[i] = r
	}
	p.SetArgs(sArgs)
	sAllowedExitCodes := make([]int64, len(o.AllowedExitCodes))
	for i, r := range o.AllowedExitCodes {
		sAllowedExitCodes[i] = r
	}
	p.SetAllowedExitCodes(sAllowedExitCodes)
	return p
}

// GuestPolicyRecipesUpdateStepsScriptRunToProto converts a GuestPolicyRecipesUpdateStepsScriptRun object to its proto representation.
func OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunToProto(o *alpha.GuestPolicyRecipesUpdateStepsScriptRun) *alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRun {
	if o == nil {
		return nil
	}
	p := &alphapb.OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRun{}
	p.SetScript(dcl.ValueOrEmptyString(o.Script))
	p.SetInterpreter(OsconfigAlphaGuestPolicyRecipesUpdateStepsScriptRunInterpreterEnumToProto(o.Interpreter))
	sAllowedExitCodes := make([]int64, len(o.AllowedExitCodes))
	for i, r := range o.AllowedExitCodes {
		sAllowedExitCodes[i] = r
	}
	p.SetAllowedExitCodes(sAllowedExitCodes)
	return p
}

// GuestPolicyToProto converts a GuestPolicy resource to its proto representation.
func GuestPolicyToProto(resource *alpha.GuestPolicy) *alphapb.OsconfigAlphaGuestPolicy {
	p := &alphapb.OsconfigAlphaGuestPolicy{}
	p.SetName(dcl.ValueOrEmptyString(resource.Name))
	p.SetDescription(dcl.ValueOrEmptyString(resource.Description))
	p.SetCreateTime(dcl.ValueOrEmptyString(resource.CreateTime))
	p.SetUpdateTime(dcl.ValueOrEmptyString(resource.UpdateTime))
	p.SetAssignment(OsconfigAlphaGuestPolicyAssignmentToProto(resource.Assignment))
	p.SetEtag(dcl.ValueOrEmptyString(resource.Etag))
	p.SetProject(dcl.ValueOrEmptyString(resource.Project))
	sPackages := make([]*alphapb.OsconfigAlphaGuestPolicyPackages, len(resource.Packages))
	for i, r := range resource.Packages {
		sPackages[i] = OsconfigAlphaGuestPolicyPackagesToProto(&r)
	}
	p.SetPackages(sPackages)
	sPackageRepositories := make([]*alphapb.OsconfigAlphaGuestPolicyPackageRepositories, len(resource.PackageRepositories))
	for i, r := range resource.PackageRepositories {
		sPackageRepositories[i] = OsconfigAlphaGuestPolicyPackageRepositoriesToProto(&r)
	}
	p.SetPackageRepositories(sPackageRepositories)
	sRecipes := make([]*alphapb.OsconfigAlphaGuestPolicyRecipes, len(resource.Recipes))
	for i, r := range resource.Recipes {
		sRecipes[i] = OsconfigAlphaGuestPolicyRecipesToProto(&r)
	}
	p.SetRecipes(sRecipes)

	return p
}

// applyGuestPolicy handles the gRPC request by passing it to the underlying GuestPolicy Apply() method.
func (s *GuestPolicyServer) applyGuestPolicy(ctx context.Context, c *alpha.Client, request *alphapb.ApplyOsconfigAlphaGuestPolicyRequest) (*alphapb.OsconfigAlphaGuestPolicy, error) {
	p := ProtoToGuestPolicy(request.GetResource())
	res, err := c.ApplyGuestPolicy(ctx, p)
	if err != nil {
		return nil, err
	}
	r := GuestPolicyToProto(res)
	return r, nil
}

// applyOsconfigAlphaGuestPolicy handles the gRPC request by passing it to the underlying GuestPolicy Apply() method.
func (s *GuestPolicyServer) ApplyOsconfigAlphaGuestPolicy(ctx context.Context, request *alphapb.ApplyOsconfigAlphaGuestPolicyRequest) (*alphapb.OsconfigAlphaGuestPolicy, error) {
	cl, err := createConfigGuestPolicy(ctx, request.GetServiceAccountFile())
	if err != nil {
		return nil, err
	}
	return s.applyGuestPolicy(ctx, cl, request)
}

// DeleteGuestPolicy handles the gRPC request by passing it to the underlying GuestPolicy Delete() method.
func (s *GuestPolicyServer) DeleteOsconfigAlphaGuestPolicy(ctx context.Context, request *alphapb.DeleteOsconfigAlphaGuestPolicyRequest) (*emptypb.Empty, error) {

	cl, err := createConfigGuestPolicy(ctx, request.GetServiceAccountFile())
	if err != nil {
		return nil, err
	}
	return &emptypb.Empty{}, cl.DeleteGuestPolicy(ctx, ProtoToGuestPolicy(request.GetResource()))

}

// ListOsconfigAlphaGuestPolicy handles the gRPC request by passing it to the underlying GuestPolicyList() method.
func (s *GuestPolicyServer) ListOsconfigAlphaGuestPolicy(ctx context.Context, request *alphapb.ListOsconfigAlphaGuestPolicyRequest) (*alphapb.ListOsconfigAlphaGuestPolicyResponse, error) {
	cl, err := createConfigGuestPolicy(ctx, request.GetServiceAccountFile())
	if err != nil {
		return nil, err
	}

	resources, err := cl.ListGuestPolicy(ctx, request.GetProject())
	if err != nil {
		return nil, err
	}
	var protos []*alphapb.OsconfigAlphaGuestPolicy
	for _, r := range resources.Items {
		rp := GuestPolicyToProto(r)
		protos = append(protos, rp)
	}
	p := &alphapb.ListOsconfigAlphaGuestPolicyResponse{}
	p.SetItems(protos)
	return p, nil
}

func createConfigGuestPolicy(ctx context.Context, service_account_file string) (*alpha.Client, error) {

	conf := dcl.NewConfig(dcl.WithUserAgent("dcl-test"), dcl.WithCredentialsFile(service_account_file))
	return alpha.NewClient(conf), nil
}


Featuring NTEP and Measurement Canada approvals, the brand-new PR Series Precision Balances from OHAUS provide necessary functionality for legal-for-trade applications such as direct sale or packaging. Including basic weighing, percent weighing, and parts counting modes, PR Series balances are capable of displaying weight in grams, milligrams, carats, ounces, and more, and can be easily connected to point-of-sale systems or printers. Offering varied connectivity options, an easy-to-read, brightly lit display, and a simple user interface, the OHAUS PR Series is built for durability and longevity at an economical price point.


I don't typically come across a lot of cool ads for cars but there was something about this one I found very cool. One of our avid readers, Mikko Suhonen, sent this over to us and I thought I would feature it for today's post. The one thing I like about is the creation of the car from the ground up, and more importantly the way they decided to showcase it. Sort of like a puzzle in a way. Anyways, not much else to say...remember to keep sending your ads our way and if they're good we will make sure to feature them on one of our daily posts. Have a great weekend!


Blue finally speaks! One of Nickelodeon's most beloved characters, the adorably inquisitive pup romps through a collection of fairy tale-themed episodes, filled with sing-a-longs and imaginative games. Joined by a cast of eccentric playmates, Blue explores fun concepts such as spelling and counting. Preschoolers will have a ball tagging along with Blue and her friends as they journey through the fun-filled woods to grandma's house.


text:
Connect LinkedIn
Follow Tumblr
STERANKO AND THE AMERICAN SUPERHERO
SPIRIT OF AMERICA, STERANKO, CAPTAIN AMERICA AND SUPPORTING CHARACTERS ™ and ©2019 MARVEL CHARACTERS, INC. SPIRIT OF AMERICA PAINTING ©2002 JIM STERANKO ARR and USED WITH PERMISSION.
STERANKO AND THE AMERICAN HERO
May 3 – July 5, 2020
Meet the Artist: To be announced at a later date
The Butler Institute of American Art is proud to announce the Premiere Exhibition of 60 select paintings visualizing the most popular and prominent heroes dominating the current international entertainment scene. Across all mediums, from the cinema to comics, STERANKO was cited by Stan Lee as one of the prime architects of the Marvel Universe; the co-creator of NICK FURY, AGENT OF S.H.I.E.L.D.; and the artist-writer of CAPTAIN AMERICA, THE HULK, SUPERMAN, and THE X-MEN (for which he designed the classic title logo). He generated more than 150 original storytelling devices and techniques that changed the direction of the comics' medium, and evolved a devoted cult of followers who nicknamed him The Innovator.
As a musician, he gigged with Bill Haley in the early days of rock 'n' roll; as a pop-culture icon, he appeared at more than 400 events and exhibited his work worldwide, including at the Smithsonian Institute in Washington, DC and the Louvre in Paris. His two volumes of THE STERANKO HISTORY OF COMICS have sold more than 100,000 copies each. As an escape artist, his death defying performances inspired the character Mister Miracle and, according to Pulitzer Prize-winning novelist Michael Chabon, he was the man upon whom the protagonist of THE AMAZING ADVENTURES OF KAVALIER & KLAY was based; and more—designer, historian, magician, photographer, ad-agency art director, sideshow fire-eater, male model, typographer…the list goes on.
Steranko has painted a multitude of movie posters, record albums, and book covers; and in 1975, created RED TIDE, the First Modern Graphic Novel. As the editor-publisher of the international newsstand entertainment magazine PREVUE, he conducted hundreds of superstar interviews and penned more than three million words. He numbers among his friends and associates writers Mickey Spillane, Arthur C. Clarke, and Ray Bradbury, and directors Federico Fellini, John Huston, and Orson Welles.
As a filmmaker, he collaborated with Steven Spielberg, George Lucas—for whom he created the look of Indiana Jones—and Francis Ford Coppola on some of their most popular films. His recent covers on ACTION 1000 and DETECTIVE 1000 set sales records. Recent polls cite Steranko as the 5th Most Influential Creator in the history of the narrative art form. He set what might be a world's record for visualizing more classic fictional heroic characters—including Luke Skywalker, The Spider, Sherlock Holmes, the Fantastic Four, Mike Hammer, the Green Hornet, James Bond, Batman, Han Solo, the Phantom, Sam Spade, Captain Kirk, Mr. Spock, Conan, Doc Savage, Buck Rogers, and The Shadow (for which he painted 30 book covers)—than any other artist. All, and more, will be represented in the 2020 Summer Exhibit.
Exhibition, Featured
May 3 - July 5, 2020
Exhibition | Featured
84th National Midyear show
Dorothy Churchill-Johnson
Life Examined: The Impressionistic Realism of Sam Rosenthal
Pastel Society of America

redpajama_set_name: RedPajamaCommonCrawl


Comfort rules. You want to be able to sit in a good chair comfortably for a few hours and be able to talk and enjoy a glass of wine. There's nothing worse than sitting in an uncomfortable chair.
Comfort the afflicted, and afflict the comfortable."Rule #1 in journalism.
Comforts and syphilis are the greatest enemies of mankind.
Comfort me by a solemn Assurance, that when the little Parlour in which I sit at this Instant, shall be reduced to a worse furnished Box, I shall be read, with Honour, by those who never knew nor saw me, and whom I shall neither know nor see.
Comfort me from wherever you are–alone, we are quickly worn out; if I place my head on the road, let it seem softened by you. Could it be that even from afar we offer each other a gentle breath?
Comfort and familiarity were wonderful but they also dulled passion and excitement. Predictability and habit made surprises almost impossible.
Comfort is very important to me. I think people live better in big houses and in big clothes.
Comfort came in with the middle classes.
Let us imagine a coming generation with such intrepidity of vision, with such a heroic penchant for the tremendous; let us imagine the bold stride of these dragon-slayers, the proud audacity with which they turn their back on all the weakling's doctrines of optimism in order to 'live resolutely' in wholeness and fullness: would it not be necessary for the tragic man of such a culture, in view of his self-education for seriousness and terror, to desire a new art, the art of metaphysical comfort, to desire tragedy as his own proper Helen, and to exclaim with Faust: Should not my longing overleap the distance. And draw the fairest form into existence?"Would it not be necessary?"--No, thrice no! O you young romantics: it would not be necessary! But it is highly probably that it will end that way, that you end that way--namely, "comforted," as it is written, in spite of all self-education for seriousness and terror, "comforted metaphysically"--in sum, as romantics end, as Christians.
No worst, there is none. Pitched past pitch of grief, More pangs will, schooled at forepangs, wilder wring. Comforter, where, where is your comforting? Mary, mother of us, where is your relief? My cries heave, herds-long; huddle in a main, a chief- woe, world-sorrow; on an age-old anvil wince and sing — Then lull, then leave off. Fury had shrieked 'No ling- ering! Let me be fell: force I must be brief'. O the mind, mind has mountains; cliffs of fall Frightful, sheer, no-man-fathomed. Hold them cheap May who ne'er hung there. Nor does long our small Durance deal with that steep or deep. Here! creep, Wretch, under a comfort serves in a whirlwind: all Life death does end and each day dies with sleep.
Ecstasy is a complex emotion containing elements of joy, fear, terror, triumph, surrender, and empathy. What has replaced our prehistoric understanding of this complex of ecstasy now is the word comfort, a tremendously bloodless notion. Drugs are not comfortable, and anyone who thinks they are comfortable or even escapist should not toy with drugs unless they're willing to get their noses rubbed in their own stuff.
Do not resist events that move you out of your comfort zone, especially when your comfort zone was not all that comfortable.
It is only that people are far more different than is pretended. All over the world men and women are worrying because they cannot develop as they are supposed to develop. Here and there they have the matter out, and it comforts them. Don't fret yourself, Helen. Develop what you have; love your child. I do not love children. I am thankful to have none. I can play with their beauty and charm, but that is all - nothing real, not one scrap of what there ought to be. And others - others go farther still, and move outside humanity altogether. A place, as well as a person, may catch the glow. Don't you see that all this leads to comfort in the end? It is part of the battle against sameness. Differences - eternal differences, planted by God in a single family, so that there may always be colour; sorrow, perhaps, but colour in the daily grey.
Then listen to me,' he said and cleared his throat. 'It's true that a child belongs to its father. But when a father beats his child, it seeks sympathy in its mother's hut. A man belongs to his fatherland when things are good and life is sweet. But when there is sorrow and bitterness he finds refuge in his motherland. Your mother is there to protect you. She is buried there. And that is why we say that mother is supreme. Is it right that you, Okonkwo, should bring your mother a heavy face and refuse to be comforted? Be careful or you may displease the dead. Your duty is to comfort your wives and children and take them back to your fatherland after seven years. But if you allow sorrow to weigh you down and kill you, they will all die in exile.
One that is ever kind said yesterday:'Your well-beloved's hair has threads of grey, And little shadows come about her eyes; Time can but make it easier to be wise. Though now it seems impossible, and so. All that you need is patience.'Heart cries, 'No, I have not a crumb of comfort, not a grain. Time can but make her beauty over again: Because of that great nobleness of hers. The fire that stirs about her, when she stirs, Burns but more clearly. O she had not these ways. When all the wild Summer was in her gaze.' Heart! O heart! if she'd but turn her head, You'd know the folly of being comforted!
Nikolushka and his upbringing, Andre, and religion were Princess Marya's comforts and joys; but, besides that, since every human being needs his personal hope, Princess Marya had in the deepest recesses of her soul a hidden dream and hope, which provided the main comfort of her life.
I pray thee, cease thy counsel, Which falls into mine ears as profitless. As water in a sieve: give not me counsel; Nor let no comforter delight mine ear. But such a one whose wrongs do suit with mine:... for, brother, men. Can counsel and speak comfort to that grief Which they themselves not feel; but, tasting it, Their counsel turns to passion, which before. Would give preceptial medicine to rage, Fetter strong madness in a silken thread, Charm ache with air and agony with words. No, no; 'tis all men's office to speak patience. To those that wring under the load of sorrow, But no man's virtue nor sufficiency. To be so moral when he shall endure. The like himself. Therefore give me no counsel: My griefs cry louder than advertisement.
I had a woman breakdown and cry when she met me which was difficult to deal with because immediately when someone starts to cry, you want to comfort them, you know, "Poor thing." I comforted her. I tried to make her feel better.