// UnmarshalBinary decodes the object from a binary format. func (s *Series) UnmarshalBinary(buf []byte) error { var pb legacy_internal.Series if err := proto.Unmarshal(buf, &pb); err != nil { return err } s.Key = pb.GetKey() s.Tags = make(map[string]string) for _, t := range pb.Tags { s.Tags[t.GetKey()] = t.GetValue() } return nil }