Converts Infra to its protobuf representation. Returns: An InfraProto protobuf.
(self)
| 122 | infra_objects: List[InfraObject] = field(default_factory=list) |
| 123 | |
| 124 | def to_proto(self) -> InfraProto: |
| 125 | """ |
| 126 | Converts Infra to its protobuf representation. |
| 127 | |
| 128 | Returns: |
| 129 | An InfraProto protobuf. |
| 130 | """ |
| 131 | infra_proto = InfraProto() |
| 132 | for infra_object in self.infra_objects: |
| 133 | infra_object_proto = infra_object.to_infra_object_proto() |
| 134 | infra_proto.infra_objects.append(infra_object_proto) |
| 135 | |
| 136 | return infra_proto |
| 137 | |
| 138 | @classmethod |
| 139 | def from_proto(cls, infra_proto: InfraProto): |
nothing calls this directly
no test coverage detected