(generation *v1pb.GenerationMetadata)
| 1077 | } |
| 1078 | |
| 1079 | func convertV1GenerationMetadata(generation *v1pb.GenerationMetadata) *storepb.GenerationMetadata { |
| 1080 | if generation == nil { |
| 1081 | return nil |
| 1082 | } |
| 1083 | meta := &storepb.GenerationMetadata{ |
| 1084 | Expression: generation.Expression, |
| 1085 | } |
| 1086 | switch generation.Type { |
| 1087 | case v1pb.GenerationMetadata_VIRTUAL: |
| 1088 | meta.Type = storepb.GenerationMetadata_TYPE_VIRTUAL |
| 1089 | case v1pb.GenerationMetadata_STORED: |
| 1090 | meta.Type = storepb.GenerationMetadata_TYPE_STORED |
| 1091 | default: |
| 1092 | meta.Type = storepb.GenerationMetadata_TYPE_UNSPECIFIED |
| 1093 | } |
| 1094 | return meta |
| 1095 | } |
no outgoing calls
no test coverage detected