func ProtoToAssignment(p *bigqueryreservationpb.BigqueryreservationAssignment) *bigqueryreservation.Assignment {
	obj := &bigqueryreservation.Assignment{
		Name:        dcl.StringOrNil(p.GetName()),
		Assignee:    dcl.StringOrNil(p.GetAssignee()),
		JobType:     ProtoToBigqueryreservationAssignmentJobTypeEnum(p.GetJobType()),
		State:       ProtoToBigqueryreservationAssignmentStateEnum(p.GetState()),
		Project:     dcl.StringOrNil(p.GetProject()),
		Location:    dcl.StringOrNil(p.GetLocation()),
		Reservation: dcl.StringOrNil(p.GetReservation()),
	}
	return obj
}
ProtoToAssignment converts a Assignment resource from its proto representation.
package server
import (
	"context"
	"github.com/GoogleCloudPlatform/declarative-resource-client-library/dcl"
	bigqueryreservationpb "github.com/GoogleCloudPlatform/declarative-resource-client-library/python/proto/bigqueryreservation/bigqueryreservation_go_proto"
	emptypb "github.com/GoogleCloudPlatform/declarative-resource-client-library/python/proto/empty_go_proto"
	"github.com/GoogleCloudPlatform/declarative-resource-client-library/services/google/bigqueryreservation"
)
type AssignmentServer struct{}
func ProtoToBigqueryreservationAssignmentJobTypeEnum(e bigqueryreservationpb.BigqueryreservationAssignmentJobTypeEnum) *bigqueryreservation.AssignmentJobTypeEnum {
	if e == 0 {
		return nil
	}
	if n, ok := bigqueryreservationpb.BigqueryreservationAssignmentJobTypeEnum_name[int32(e)]; ok {
		e := bigqueryreservation.AssignmentJobTypeEnum(n[len("BigqueryreservationAssignmentJobTypeEnum"):])
		return &e
	}
	return nil
}
func ProtoToBigqueryreservationAssignmentStateEnum(e bigqueryreservationpb.BigqueryreservationAssignmentStateEnum) *bigqueryreservation.AssignmentStateEnum {
	if e == 0 {
		return nil
	}
	if n, ok := bigqueryreservationpb.BigqueryreservationAssignmentStateEnum_name[int32(e)]; ok {
		e := bigqueryreservation.AssignmentStateEnum(n[len("BigqueryreservationAssignmentStateEnum"):])
		return &e
	}
	return nil
}